Code::Blocks Forums

User forums => Help => Topic started by: Aronimo on April 20, 2022, 03:09:41 am

Title: Custom plugin not using wx31
Post by: Aronimo on April 20, 2022, 03:09:41 am
I'm trying to compile a custom plugin to wxsmith, the only problem is that it only compiles in default mode, and this mode simply won't let me install the plugin. When I created the project for the plugin I choose to set its wx version to 31, but it never looks for this library, instead it looks for 28 or 30. Tomorrow I'll test with the 30 libraries, but is there a workaround with 31? I ve notice about a thread in the forums (https://forums.codeblocks.org/index.php?topic=24347.0) discussing the same problem, but I couldnt understand what I should do. If i wish to compile my plugin using 30 i must recompile cb in this version as well?
Title: Re: Custom plugin not using wx31
Post by: BlueHazzard on April 20, 2022, 01:38:32 pm
Probably the plugin code generation is not up to date for wx31...
You can manualy fix this, by replacing 30 with 31 in the project file

Can you share your project file?
Title: Re: Custom plugin not using wx31
Post by: Aronimo on April 20, 2022, 10:15:51 pm
How do I manually alter this? Here is the file:
Title: Re: Custom plugin not using wx31
Post by: BlueHazzard on April 20, 2022, 10:31:38 pm
You have to compile the "default" target
What operating system are you using?

can you post a build log.

I will look into the script wizard script and fix it... But this can take some time...
Title: Re: Custom plugin not using wx31
Post by: Aronimo on April 20, 2022, 11:34:39 pm
I use a Windows 10. I always have compiled it to default, but trying to install as a plugin won't work. I compiled it alone, as shown in the wxsmith tutorials.

Code
Target is up to date.
Running target post-build steps
zip -j9 MyChart.zip manifest.xml
zip -j9 MyChart.cbplugin MyChart.dll MyChart.zip
  adding: manifest.xml (164 bytes security) (deflated 53%)
updating: MyChart.dll (164 bytes security)
 (deflated 70%)
updating: MyChart.zip (164 bytes security) (deflated 8%)
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Title: Re: Custom plugin not using wx31
Post by: BlueHazzard on April 21, 2022, 09:22:23 am
Can you make a rebuild and post the log:
Build->Rebuild

This only shows, that compilation was successful and everything should work...
What error do you get? Simply "does not work" is not really a error description...
Title: Re: Custom plugin not using wx31
Post by: stahta01 on April 21, 2022, 10:47:17 am
A common mistake is using a different compiler version in building a plugin than was used in the building of the Code::Blocks.
Another one is linking to a different wxWidgets version than was used to build the Code::Blocks.

Tim S.
Title: Re: Custom plugin not using wx31
Post by: AndrewCot on April 21, 2022, 11:39:21 am
The project file included in the zip from reply #2 above has a bunch of issues and inconsistencies.  Cannot get it working as there are missing files and it's been hacked without a deep understanding of how C::B projects work.

First lets go back to square 1:

When starting out I would advise starting simple and build from there. I would start as follows:
Title: Re: Custom plugin not using wx31
Post by: Aronimo on April 21, 2022, 11:02:07 pm
People let's forget about this, i've been trying to setup a plugin to help me develop more easily, but after one entire week I will just move out of Code::Blocks and build GUI apps on code with no GUI builder (by that i mean im going visual studio). But anyway much thanks for trying to help me but i cant keep with this, literally one entire week to get nothing out of this...