Posts

Showing posts from 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)” ...

MSBUILD: "Solution file error MSB5013: Error parsing a project section"

I was trying to create a batch file to build projects using msbuild tool of Visual Studio 2008. As I was along the way I encountered the error "Solution file error MSB5013: Error parsing a project section.". At first, don't know why this happens wherein building the said solution in IDE seems fine. So, what I did is open another solution that was built successfully using msbuild compared it to erroneous solution. I found out a minor difference. A missing quote. Added it and build it again using msbuild and the error is gone. Encountering this error will not have the same fix and must open the solution file to find out yourself what's the parsing error is all about. That's it. Enjoy!