Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: damateem on January 03, 2012, 11:22:13 pm
-
How do I create a DLL project that allows me to use wxSmith to define windows that are displayed from within the DLL?
Thanks,
David
wxWidgets 2.8.11
Microsoft Windows 7 x64
Code::Blocks 10.05
-
I would use the project wizard to create a DLL project, then select wxSmith->Add wxFrame (or, of course, wxSmith->Add wxDialog).
You will have to add the bindings from the wxSmith generated files to your DLL (main.cpp) manually.
-
To get the wxWidgets dependencies, I decided to go the opposite route. I created a wxWidgets project and then changed the project Properties Build Target to dynamic library. Then I removed the generated app and main files and added the main.c/h from a standard dynamic library project. The only thing left was to add the BUILD_DLL define to the project defines.
Compiles and links without error. Haven't tried to use the dll yet.