Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: techtonik on September 01, 2008, 06:29:17 pm

Title: How to compile plugin for released CB version
Post by: techtonik on September 01, 2008, 06:29:17 pm
I have sources for plugin and sources for CB (8.02). I can compile both and run ok, but when I try to load plugin with official 8.02 CB downloaded from SourceForge - it fails. It would be nice to get a more descriptive message why. Can anybody explain me what is so special in .dll and CB compatibility and what to watch out when writing plugins to be used with official distributive?
Title: Re: How to compile plugin for released CB version
Post by: JGM on September 01, 2008, 06:54:41 pm
http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

I havent finished explaining that but you should get it, also is explained for nightly builds but works with the 8.02 release also.
Title: Re: How to compile plugin for released CB version
Post by: techtonik on September 02, 2008, 10:12:53 am
Valuable information, thanks. Still many question and nothing I could really test right now. The most confusion lies in Step Two: "configure the setup.h to be compatible". How can I know which options should be set to make it compatible?

Then the step Three: "add the needed libraries to the linker". I've run Dependency Walker on my and on official version of plugin and found that they are linked to different .dll names of wxwidgets. Official uses WXMSW28U_GCC_CB.DLL and my own uses WXMSW28U_GCC_CUSTOM.DLL. I haven't found any references to CB ot CUSTOM suffix (or _GCC_CB and _GCC_CUSTOM to be precise) in project options. There is only WX_SUFFIX=u variable in build options used to specify wxmsw28$(WX_SUFFIX) link library. I suspect that _GCC_CB suffix of linked library should have something to do with wxWidgets configuration in setup.h

I suppose I need this setup.h from official distributive? If it is so - where can I get one for version 8.02 of CB?
Title: Re: How to compile plugin for released CB version
Post by: stahta01 on September 09, 2008, 05:48:51 am
I think you need to do "Step Three" of
http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

I am guessing the directions mean to replace library wxmsw28u with wxmsw28u_gcc_cb to use the dll.
Note, I assume you might have to make sure the wxmsw28u_gcc_cb.dll is in the library search path.

Tim S
Title: Re: How to compile plugin for released CB version
Post by: techtonik on September 10, 2008, 06:32:15 pm
Gosh, it works! You made my day!  :wink:

Updated instructions on http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build
Title: Re: How to compile plugin for released CB version
Post by: JGM on September 28, 2008, 07:14:28 pm
Gosh, it works! You made my day!  :wink:

Updated instructions on http://wiki.codeblocks.org/index.php?title=Linking_the_plugin_to_a_Nightly_Build

Hey great job! now the article is really well done  :D