News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Use wxSmith inside DLL

Started by damateem, January 03, 2012, 11:22:13 PM

Previous topic - Next topic

damateem

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

Alpha

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.

damateem

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.