The current Makefile is trying to link the wxSmithContribItems with wxSmith, using the static linker. This doesn't work on Mac OS X, where the plugins are loaded using the dynamic linker.
ERROR: /Users/afb/codeblocks/CodeBlocks.app/Contents/Resources/share/codeblocks/plugins/libwxsmithcontribitems.so: not loaded (missing symbols?)
It is trying to load a shared library that doesn't exist:
CodeBlocks.app/Contents/Resources/share/codeblocks/plugins/libwxsmithcontribitems.so:
@executable_path/libcodeblocks.0.dylib (compatibility version 1.0.0, current version 1.1.0)
@executable_path/libwx_macu-2.6.0.dylib (compatibility version 3.0.0, current version 3.1.0)
/usr/local/share/codeblocks/plugins/libwxsmith.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.4)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
Will remove this later, for now I just patched the Makefile so that it compiles in order to not break build.
Hopefully it will find the symbols, by loading wxSmith bundle.
Splitting the module works OK, I called the library "wxsmithlib":
http://www.algonet.se/~afb/wx/codeblocks-wxsmithlib.patch
The Makefile isn't perfect, seems like you can only have one
"libdir" so it installed libwxsmith.so into lib instead of plugins...
You might want to do a different split, I just extracted as little
code as possible out from wxsmith.cpp and wxsmithmime.cpp.
But doing it this way makes wxSmith load again on Mac OS X.
(including the wxSmithMime and wxSmithContribItems plugins)
4.0K /usr/local/lib/libwxsmithlib.0.0.1.dylib -> libwxsmithlib.0.dylib
119M /usr/local/lib/libwxsmithlib.0.dylib
4.0K /usr/local/lib/libwxsmithlib.dylib -> libwxsmithlib.0.dylib
4.0K /usr/local/lib/libwxsmithlib.la
4.0K /usr/local/share/codeblocks/plugins/libwxsmith.la
728K /usr/local/share/codeblocks/plugins/libwxsmith.so
4.0K /usr/local/share/codeblocks/plugins/libwxsmithcontribitems.la
7.4M /usr/local/share/codeblocks/plugins/libwxsmithcontribitems.so
Seems to have worked, but one was missing:
*** Warning: Linking the shared library libwxsmithcontribitems.la against the loadable module
*** libwxsmith.so is not portable!
** Warning, lib libwxsmith.so is a module, not a shared library
...
/usr/bin/ld: ../wxSmith/.libs/libwxsmith.so is input for the dynamic link editor, is not relocatable by the static link editor again
Still need to fix the bug where the .so module ends up
in the wrong directory. Maybe just "mv" it after install ?
/usr/local/lib/libwxsmith.so
/usr/local/share/codeblocks/plugins/libwxsmithcontribitems.so