Author Topic: Use wxSmith inside DLL  (Read 1937 times)

Offline damateem

  • Single posting newcomer
  • *
  • Posts: 6
Use wxSmith inside DLL
« 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

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Use wxSmith inside DLL
« Reply #1 on: January 03, 2012, 11:38:48 pm »
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.

Offline damateem

  • Single posting newcomer
  • *
  • Posts: 6
Re: Use wxSmith inside DLL
« Reply #2 on: January 05, 2012, 01:56:07 am »
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.