To create my first plugin I followed the hints in 'Creating a simple "Hello World" plugin' (http://wiki.codeblocks.org/index.php?title=Creating_a_simple_%22Hello_World%22_plugin).
The tutorial is outdated, so I added the following paths
Build options -> Search directories -> Compiler
<SOURCE>/src/sdk/propgrid/include
<SOURCE>/src/sdk/scripting/include
<SOURCE>/src/sdk/wxFlatNotebook/include
<SOURCE>/src/sdk/wxscintilla/include
Build options -> Search directories -> Linker
<SOURCE>/src/sdk/wxscintilla/include
<INSTALL>/codeblocks/lib
and built the project.
When I try to install the *.cbplugin in the "Plugins->Manage plugins -> Install new" I get a
"One or more plugins were not installed succesfully".
So what did I do wrong...?
I created the plugin with C::B's plugin wizard as Tool plugin under Linux 2.6.13, gcc 4.0.2, binutils 2.16.91.0.2, wx 2.6.1, C::B svn 3593
Check C::B's debug log for more information. Did you create a resource .zip with a manifest for the plugin?
There is no exception report (at least not in the /tmp where C::B usually puts them).
The resource .zip is there (you mean the MyPlugin.zip, I guess) and contains just the manifest
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_plugin_manifest_file>
<SdkVersion major="1" minor="11" release="8" />
<Plugin name="MyPlugin">
<Value title="MyPlugin" />
<Value version="0.1" />
<Value description="" />
<Value author="Georg-Johann Lay" />
<Value authorEmail="foo@bar.com" />
<Value authorWebsite="" />
<Value thanksTo="" />
<Value license="GPL" />
</Plugin>
</CodeBlocks_plugin_manifest_file>
The plugin dir contains the .so as expected:
-rw-rw---- 1 georg users 520 2007-02-12 15:18 manifest.xml
-rw-rw---- 1 georg users 1086 2007-02-12 15:18 MyPlugin.cbp
-rw-rw---- 1 georg users 53482 2007-02-12 15:22 MyPlugin.cbplugin
-rw-rw---- 1 georg users 1697 2007-02-12 15:22 MyPlugin.cpp
-rw-rw---- 1 georg users 2292 2007-02-12 15:18 MyPlugin.h
-rwxrwx--- 1 georg users 160885 2007-02-12 15:22 MyPlugin.so
-rw-rw---- 1 georg users 406 2007-02-12 15:22 MyPlugin.zip
http://forums.codeblocks.org/index.php?topic=4290.msg33916#msg33916
Plug-Ins : some suggested "case" conventions
Yes, I followed the case rules.
Your plugin is NOT compiling. You should have told us of your errors.
Äh... The plugin project did compile without warnings and errors (svn 3596):
-------------- Build: default in MyPlugin ---------------
Compiling: MyPlugin.cpp
Linking dynamic library: MyPlugin.so
Running target post-build steps
zip -j9 MyPlugin.zip manifest.xml
updating: manifest.xml (deflated 52%)
zip -j9 MyPlugin.cbplugin MyPlugin.so MyPlugin.zip
updating: MyPlugin.so (deflated 67%)
updating: MyPlugin.zip (deflated 8%)
Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 0 warnings
I now switched to svn 3615 and when I start c::b there is a "Global Variable Editor" dialog popping up for "cb" with the fields base, include, lib, obj, cflags, lflags. For "cb.base" I entered the c::b source folder, i.e. where bootstrap is located.
For "wx" I am clueless. I entered
wx.base=/usr
wx.include=include/wx-2.6
wx.lib=lib
Is that correct?
Building the MyPlugin yields the same as above: no errors, no warnings
restarting c::b, the error in the logs is still the same
[16:26:44.282]: ERROR: SDK version mismatch for MyPlugin (1.11.5). Expecting 1.11.8
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:
Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 0 warnings
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:
[16:55:15.929]: ERROR: SDK version mismatch for SecondPlugin (1.11.5). Expecting 1.11.10
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.