Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Getting started with plugins [resolved]

<< < (5/5)

stardust:

--- Quote from: TDragon on February 19, 2007, 04:42:13 pm ---Make sure that the version you compile against is the version you test with.

--- End quote ---

There is only one instance (source and an installation generated from it) of c::b in my system so that should be ok. At the moment this is svn 3615.

The plugin's source directory is not located in the c::b plugins directory. Does that matter?

TDragon:

--- Quote from: stardust on February 19, 2007, 05:09:42 pm ---The plugin's source directory is not located in the c::b plugins directory. Does that matter?

--- End quote ---
It shouldn't...

All I can say is make sure everything matches up. Ensure that the revision displayed on C::B's start page matches the revision shown by the "svn info" command. Delete your plugin .so and make sure that it's created where it should be when you compile it (so that you aren't inadvertently using an older version). Make sure you aren't mistakenly using an older version of C::B that's floating around on your system somewhere.

In my limited knowledge of the C::B sdk, the relevant areas of code appear to be sdk/pluginmanager.cpp in the PluginManager::RegisterPlugin function and include/cbplugin.h in PluginRegistrant's SDKVersion function. As far as I can see, your versions would only fail to match when the PLUGIN_SDK_VERSION_* constants change between revisions and you rebuild C::B but not your plugin, or vice versa.

stardust:
Ok, I threw away all c::b sources, checked out svn 3627, rebuilt c::b from scratch, had the project wizard generated a brand new plugin "SecondPlugin", entered #cb and #wx stuff and built it:


--- Code: ---Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 0 warnings
--- End code ---

copied the files to the mentioned locations, quit and resterted c::b (the same as I generated the plugin with) and the problem is still the same:


--- Code: ---[16:55:15.929]: ERROR: SDK version mismatch for SecondPlugin (1.11.5). Expecting 1.11.10

--- End code ---

Are my settings of #cb and #wx correct?

SecondPlugin->Build Options->default->Search Directories->Compiler
$(#cb)/include
$(#wx.include)
$(#cb)/sdk/scintilla/include

SecondPlugin->Build Options->default->Search Directories->Linker
$(#cb)/lib

Anyway, as the project builds without errors (i.e. no missing include files, no unresolved references) these settings should do resp. are not used at all...

The SecondPlugin is there:

http://freenet-homepage.de/hightec-rt/SecondPlugin.zip

I did not change the sdk version entry in the manifest. Everything is untouched and comes right from c::b.

mandrav:

--- Quote ---I did not change the sdk version entry in the manifest. Everything is untouched and comes right from c::b.
--- End quote ---

As stated above, the version in the manifest is currently ignored.
Anyway, the version number your plugin uses is "created" at compile-time with the help of the PluginRegistrant class (in cbPlugin.h). This uses the PLUGIN_SDK_VERSION_* macros (located in the same file). So, if your plugin is still built for the wrong SDK version, this can only mean one thing: you have installed the C::B SDK globally (e.g. /usr/include or /usr/local/include) and the compiler picks up that version, that is the wrong one.
So, uninstall any C::B headers from global dirs and rebuild your plugin. This will work.

stardust:
*ARRGGH*

Yes, there *were* remains from an ancient standard installation of c::b in
/usr/local/include/codeblocks and /opt/gnome/include/codeblocks.

Thanks!

Now it runs and says "Hello World!"!!!! :D

By the way...

why are crtn.o, crtbeginS.o etc. put into a .so?


--- Quote from: build log ---gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
 /usr/lib/gcc/i586-suse-linux/4.0.2/collect2 --eh-frame-hdr -m elf_i386 -shared -o ThirdPlugin.so /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crti.o /usr/lib/gcc/i586-suse-linux/4.0.2/crtbeginS.o -L/local/install/codeblocks/lib -L/usr/lib -L/opt/gnome/lib -L/usr/X11R6/lib -L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../../../i586-suse-linux/lib -L/usr/lib/gcc/i586-suse-linux/4.0.2/../../.. .objs/ThirdPlugin.o -lcodeblocks -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6 -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s /usr/lib/gcc/i586-suse-linux/4.0.2/crtendS.o /usr/lib/gcc/i586-suse-linux/4.0.2/../../../crtn.o

--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version