compiling wxWidgets, MS VC 2003 .Net versus MS VS 2005

Carsten A. Arnholm arnholm at offline.no
Sun Jul 15 12:10:08 PDT 2007


Vadim Zeitlin wrote:
> On Sun, 15 Jul 2007 20:29:39 +0200 "Carsten A. Arnholm"
> <arnholm at offline.no> wrote:
>
>> I agree this should not be necessary, but in real life sometimes its
>> is.
>
> I'm sorry, but I can't agree with this argument. If it shouldn't be
> necessary, then it is not necessary -- or there is some
> misunderstanding or
> some other problem (possibly in wx) which should be fixed.

You are right. I just tried building my application without the

/NODEFAULTLIB:libcmt.lib
/NODEFAULTLIB:msvcrtd.lib

... and it looks like everything is ok without them now. These options were 
leftovers from when I had some other things wrong, and didn't quite 
understand what was going on.

>> For building an application that uses wxWidgets, it can still be a
>> problem to set things up properly
>
> Using MSVC by far the easiest thing to do is to add include/msvc
> directory
> in the HEAD of the include paths of your project. Then the correct
> (for the current values of _DEBUG, _UNICODE and WXUSINGDLL)
> configuration will be
> chosen automatically, you don't need to change anything else.

The added twist is that I am not using the VS IDE, but Code::Blocks with the 
MS C++ compiler/linker. What you say is of course still true. I have not 
defined WXUSINGDLL since I am linking wxWidgets statically (but using MS 
runtime DLLs). The challenge is really to understand how these things work. 
Then it is not so hard to get it right.

Best regards and thanks for all the excellent work on wxWidgets!

-- 
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457 








More information about the wx-users mailing list