Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
HelloWorld Plugin on Ubuntu 11.04
hibbity:
wxthings (wxscustombutton) was authored in 2009, but it should still work as-is even after the most recent release. I don't understand why it will not install. I'm linking against unicode libraries (wxWidgets 2.8.12), could that be a problem?
/usr/bin/codeblocks -d
-------------- Build: default in CustomButton ---------------
g++ -g -I/usr/include/codeblocks -I/usr/include/codeblocks/tinyxml -I/usr/include/codeblocks/scripting/include -I/usr/include/codeblocks/scripting/bindings -I/usr/include/codeblocks/scripting/sqplus -I/usr/include/codeblocks/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -march=i586 -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -c /home/guest/custom_widgets/wxlinux/wxthings/custombutton.cpp -o .objs/custombutton.o
g++ -g -I/usr/include/codeblocks -I/usr/include/codeblocks/tinyxml -I/usr/include/codeblocks/scripting/include -I/usr/include/codeblocks/scripting/bindings -I/usr/include/codeblocks/scripting/sqplus -I/usr/include/codeblocks/wxscintilla/include -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -march=i586 -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -I/usr/local/include/wx-2.8 -I/usr/include/wxsmith/contrib/include -Iwxthings/include -c /home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp -o .objs/wxscustombutton.o
g++ -shared .objs/custombutton.o .objs/wxscustombutton.o -o custombutton.so -z def -lcodeblocks -pthread -Wl,-Bsymbolic-functions -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8
Output size is 458.84 KB
Running target post-build steps
zip -j9 custombutton.zip manifest.xml
updating: manifest.xml (deflated 52%)
zip -j9 custombutton.cbplugin custombutton.so custombutton.zip
updating: custombutton.so
(deflated 68%)
updating: custombutton.zip (deflated 11%)
Process terminated with status 0 (0 minutes, 3 seconds)
0 errors, 0 warnings
Not sure what "-z defs" is intended for? It does not show up as an option for g++.
Adding it to Linker settings (Other options) causes 50 link errors:
e.g.
.objs/wxscustombutton.o: In function `wxsCustomButton':
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:68: undefined reference to `wxsWidget::wxsWidget(wxsItemResData*, wxsItemInfo const*, wxsEventDesc const*, wxsStyleSet const*, long)'
.objs/wxscustombutton.o: In function `wxsCustomButton::OnBuildCreatingCode()':
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:129: undefined reference to `wxsItem::Codef(wchar_t const*, ...)'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:132: undefined reference to `wxsBitmapIconData::IsEmpty()'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:134: undefined reference to `wxsItem::Codef(wchar_t const*, ...)'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:137: undefined reference to `wxsBitmapIconData::IsEmpty()'
/home/guest/custom_widgets/wxlinux/wxthings/wxscustombutton.cpp:139: undefined reference to `wxsItem::Codef(wchar_t const*, ...)'
etc.
oBFusCATed:
It is a linker options and it is defs not def!
http://www.computerhope.com/unix/uld.htm
Jenna:
If I see it right, you do not link against the wxSmith library.
hibbity:
Added the wxsmithlib library to the Project-->Build options-->Linker settings-->Link libraries
then rebuilt (0 errors and 0 warnings) then Plugins-->Manage plugins...-->Install new
and result was the same as before.
hibbity:
ld -z defs:
"Force a fatal error if any undefined symbols remain at the end of the link. This is the default when an executable is built. It is also useful when building a shared object to assure that the object is self-contained, that is, that all its symbolic references are resolved internally."
Makes sense. But, in this case I cannot see 'ld' being invoked. Could it be that g++ performs the linking?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version