Posts

Showing posts from July, 2013

How to display all environment variables and its values (C/C++)

#include<stdio.h> int main(int argc, char* argv[], char* env[]) {     int i=0;     while(env[i])     {         printf("%s\n",env[i]);         i++;     }     return 0; }

How to statically link applications to wxWidgets via Visual Studio 2008 and in Linux

Image
MS Windows Procedure: Build the wxWidgets as static   Uncompressed the source file “wxWidgets-2.8.12.tar.gz” Go to “..\wxWidgets-2.8.12\build\msw”  Right-click and open the file “wx.dsw” using Visual Studio 2008 Change the “Runtime Library” property value into “Multi-threaded (/MT)” Rebuild the solution as “Release” mode The libraries can be found in “..\wxWidgets-2.8.12\lib\vc_lib” Build the application to link with wxWidgets as static A dd e nvironment variable (for convinience) WX WIN and set the value to wherever your wxWidgets is located. Sample: c:\wxWidgets Open your application in Visual Studio 2008 and s witch the mode to “Release” “Preprocessor Definitions” must be set to: WIN32 __WXMSW__ _WINDOWS NOPCH _CRT_NONSTDC_NO_DEPRECATE            4. Change the “Runtime Library” property value into “Multi-threaded (/MT)” ...