Author Topic: Custom plugin not using wx31  (Read 1187 times)

Offline Aronimo

  • Single posting newcomer
  • *
  • Posts: 7
Custom plugin not using wx31
« 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?
« Last Edit: April 21, 2022, 05:22:24 am by Aronimo »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3187
Re: Custom plugin not using wx31
« Reply #1 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?

Offline Aronimo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Custom plugin not using wx31
« Reply #2 on: April 20, 2022, 10:15:51 pm »
How do I manually alter this? Here is the file:

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3187
Re: Custom plugin not using wx31
« Reply #3 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...

Offline Aronimo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Custom plugin not using wx31
« Reply #4 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))

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3187
Re: Custom plugin not using wx31
« Reply #5 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...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7271
    • My Best Post
Re: Custom plugin not using wx31
« Reply #6 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline AndrewCot

  • Regular
  • ***
  • Posts: 499
Re: Custom plugin not using wx31
« Reply #7 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:

  • What OS are you using?
  • What version of C::B are you using?
  • Where did you download C::B from?
  • If you are using Windows then what compiler are you using?
  • Finally why did you pick source code that is from 2006 for your first plugin!!!! This is asking to get hurt IMHO.
  • Have you looked at the https://wiki.codeblocks.org/index.php/Managing_Plug-in_Resources page? Just checking on this one.
  • Have you built C::B from source?  Just checking.
  • Have you build wxWidgets from source?  Just checking.
  • Now for a hopefully stupid question. When you start C::B are there any error shown? Just checking.
  • How did you compile the source when the MyChart.cpp includes MyChart.h, but MyChart.h is not in the zip file!!!! There is also no manifest.xml file!!!!!
  • Have you looked at the following page for dev links and info as a starting point?
  • I would suggest you start with a simple plugin. See https://wiki.codeblocks.org/index.php/Creating_a_simple_%22Hello_World%22_plugin for how it was done a while ago.
When starting out I would advise starting simple and build from there. I would start as follows:
  • Ensure you can build C::B from the SF SVN trunk on the OS of your choice. Linux and Windows are easier than Mac OS.
  • Ensure you can debug the C::B you built using C::B
  • Modify an exiting plugin and check the change worked.
  • Create a simple hello world plugin and get it working.
  • Now start with the plugin you want to do, but be aware that using 14 year old code is not a good starting point.
« Last Edit: April 21, 2022, 11:44:13 am by AndrewCot »

Offline Aronimo

  • Single posting newcomer
  • *
  • Posts: 7
Re: Custom plugin not using wx31
« Reply #8 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...