[SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Do you like to promote your wxWidgets based application or component!? Post it here and let's see what the critics have to say. Also, if you found that ONE wx component the world needs to know about, put it here for future reference.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by evstevemd »

T-Rex wrote:No CodeLite, sorry. Only generators supported by CMake.
Yeah I know, I was asking for the other guy who had it! :D
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by evstevemd »

iwbnwif wrote:Attached is a zip file of the codelite workspace. I hope it contains everything you need.
Thank you!
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
umaroff
In need of some credit
In need of some credit
Posts: 2
Joined: Wed May 04, 2016 10:12 am

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by umaroff »

Hi
Have one question. Can make plugin using static compiled wxWidgets library. So have main app (uses wxWidgets&GUI) and plugin (uses wxWidgets&GUI).
I already made one sample, but while calling moments application crashed. I didn't test in DLL compiled mode. Just want to use in static compiled mode. Because don't want every PC install MSVC++ libs.

So, question: can i make plugin and host app using static compiled wxWidgets library?

Thank you for all
User avatar
T-Rex
Moderator
Moderator
Posts: 1248
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by T-Rex »

Most likely that you can't do this. I have tried for many times but without the success. If you link statically then you will have `2+ wxWidgets instances in memory. One for each compiled module`. And this will produce the problems with event handling and RTTI.

As for VC++ libs, in general, you don't need to install the VC++ runtime on client machines. You can bundle the CRT DLLs with your app (by placing into the same folder). Or use merge modules for the installer of your app. We use merge modules for WiX installer, works more or less fine so far, very convenient technology.
umaroff
In need of some credit
In need of some credit
Posts: 2
Joined: Wed May 04, 2016 10:12 am

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by umaroff »

Thank you for answer.
I also thinking that method (so, marge all VC++ DLLs into installer). I see that static compiled application and DLL library takes inside all functions. Because both of size big (similar). This is conflicting when i use. I think best solution is using dynamic compiled library wxWidgets. So, will try compile dynamic libs. But have another good news, if you make and compile static DLL based application and use this library into not wxBased application that works fine;

So, totally solution:
If DLL based application: [static compiled - OK]
If DLL plugin,module system: best is [shared compiled - OK]

Thank you for all
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by ollydbg23 »

I see Tim's fork here:

stahta01/wxModularApp: Cross-Platform Modular Application (Main app + plugins) example for C++/wxWidgets

It has Code::Blocks projects and workspace supplied. And it can be built under Code::Blocks and Msys2's MinGW-W64 compiler without any problem. Note that the prebuilt wx 3.0 library supplied by Msys2 is used. So, you don't need to build the wx library yourself, just install it by the pacman command, see: Package: mingw-w64-x86_64-wxWidgets - MSYS2 Packages

Nice work, Tim!
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: [SAMPLE] wxWidgets app With Plugins (Windows/Linux/Mac)

Post by ollydbg23 »

I have make some improvements on Tim's Code::Blocks projects and workspace, and here is the code:

asmwarrior/wxModularApp

Also, see the screen shot of the host application which load two gui plugins.
plugin-app.png
plugin-app.png (12.52 KiB) Viewed 4112 times
EDIT:

Both wx3.0 and wx 3.1 version are added.
Post Reply