By: Adrian Lanning
Date: 05 / 06 / 03
Email: alanning55@hotmail.com
Ok, I recently built wxWindows as a DLL and had major trouble getting my Hello World program to link.
This document describes the solutions to those problems as well as how I found them.
Visual Studio .NET (7)
wxWindows built as Release DLL
If you get the following linker errors when compiling wxWindows apps:
Method 1:
#Define WXUSINGDLL
Method 2:
Add WXUSINGDLL to your preprocessor definitions:
(Right-click on your project, Properties, C/C++, Preprocessor.)
After unsuccessfully searching the web for a solution to this problem, I went step-by-step through the widget sample app project properties (which did compile and link properly) until I found the problem. Not the most elegant way to find a solution, but...
Here's the complete preprocessor definitions for the widget project:
NDEBUG,WIN32,_WINDOWS,WINVER=0x400,_MT, wxUSE_GUI=1,WXUSINGDLL