Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
HelloWorld example plugin
anio:
Yes, i build it with ./configure --prefix=/opt/wx/2.8 --enable-xrc --enable-monolithic --enable-unicode
but wx-config --prefix is giving me /usr instead of /opt/wx/2.8 and i added /opt/wx/2.8/lib to /etc/ld.so.conf
Jenna:
--- Quote from: jens on February 21, 2012, 12:41:40 pm ---How did you build C::B ?
If it was build with the automake-system, the update-script is not needed.
And you should have pkg-config files for C::B in <prefix>/lib/pkgconfig .
--- End quote ---
--- Quote from: anio on February 21, 2012, 12:54:48 pm ---Yes, i build it with ./configure --prefix=/opt/wx/2.8 --enable-xrc --enable-monolithic --enable-unicode
but wx-config --prefix is giving me /usr instead of /opt/wx/2.8 and i added /opt/wx/2.8/lib to /etc/ld.so.conf
--- End quote ---
I did not ask how you build wx, but how you build Code::Blocks .
The ./configure parameters are for wxWidgets and not for C::B.
Do not build wxWidget's on your own, unless you know exactly what you do (and what you want from it).
Configuring wxWidgets can be a non-trivial task (as your wx-config output shows), and on most linux distros there are packages available, that are known to work flawlessly.
anio:
Well, i followed strictly http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux with ./bootstrap and then make/make install
EDIT: I just tried to build the plugin in C::B. When the Install is throwing and error that cant find HelloWorld.so i found in the build log that there is actually libHelloWorld.so:
--- Quote ---/usr/local/include/codeblocks/pluginmanager.h: In constructor ‘PluginManager::PluginRegistration::PluginRegistration()’:
/usr/local/include/codeblocks/pluginmanager.h:163:77: note: synthesized method ‘PluginInfo::PluginInfo()’ first required here
Linking dynamic library: libHelloWorld.so
Output size is 157,79 KB
Running target post-build steps
zip -j9 HelloWorld.zip manifest.xml
updating: manifest.xml (deflated 52%)
zip -j9 HelloWorld.cbplugin libHelloWorld.so HelloWorld.zip
updating: libHelloWorld.so
(deflated 62%)
--- End quote ---
anio:
There is some (probably) bug with the name of the *.so file. How Ive made it to work:
--- Quote ---cp libHelloWorld.so HelloWorld.so
zip -j9 HelloWorld.cbplugin libHelloWorld.so HelloWorld.zip
--- End quote ---
Then I installed in with the plugin manager and run it:
--- Quote ---Loaded 1 plugins
HelloWorld
--- End quote ---
Edit:
In the Project Build options. "Pre/Post build" tab -> "Post-build steps" i found this:
--- Quote ---zip -j9 HelloWorld.zip manifest.xml
zip -j9 HelloWorld.cbplugin libHelloWorld.so HelloWorld.zip
--- End quote ---
Jenna:
Change the output name in the project's properties (tab "Build targets") and uncheck "Autogenerate filename prefix".
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version