Hi, i've been using code blocks for about a year now. I have it set up to use the mcc18 compiler for microchip and it works great with that. I want to get started developing plugins but i've been trying to get it to work now for a couple hours and I am gettin go were. I have the wxwidgets 2.8 compiled and i have the cb and wx global variables set. I also have minGW installed. After I go through the wizard and get the plugin template I try to compile and at first i get 'codeblocks' library can't be found so i go to build options and remove it from linker list then i try to compile again and i get this
.objs\HelloWorld.o:: In function `ZN10HelloWorldC2Ev':C:/Documents and Settings/User/Desktop/HelloWorld/HelloWorld.cpp:14: undefined reference to `cbToolPlugin::cbToolPlugin()'
:C:\Documents and Settings\User\Desktop\HelloWorld\HelloWorld.cpp:18: undefined reference to `_imp___ZN7Manager12LoadResourceERK8wxString'
.objs\HelloWorld.o:: In function `ZN10HelloWorldC1Ev':C:/Documents and Settings/User/Desktop/HelloWorld/HelloWorld.cpp:14: undefined reference to `cbToolPlugin::cbToolPlugin()'
:C:\Documents and Settings\User\Desktop\HelloWorld\HelloWorld.cpp:18: undefined reference to `_imp___ZN7Manager12LoadResourceERK8wxString'
.objs\HelloWorld.o:: In function `ZNK9__gnu_cxx17__normal_iteratorIPPN14BlockAllocatorI19CodeBlocksDockEventLj75ELb0EE11LinkedBlockIS2_EESt6vectorIS6_SaIS6_EEEdeEv':C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h:(.text$_ZN12cbToolPluginD2Ev[cbToolPlugin::~cbToolPlugin()]+0x16): undefined reference to `cbPlugin::~cbPlugin()'
.objs\HelloWorld.o:: In function `ZN10HelloWorldC2Ev':C:/Documents and Settings/User/Desktop/HelloWorld/HelloWorld.cpp:18: undefined reference to `_imp___Z11PlaceWindowP16wxTopLevelWindow17cbPlaceDialogModeb'
.objs\HelloWorld.o:: In function `ZNK9__gnu_cxx17__normal_iteratorIPPN14BlockAllocatorI19CodeBlocksDockEventLj75ELb0EE11LinkedBlockIS2_EESt6vectorIS6_SaIS6_EEEdeEv':C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h:(.rdata$_ZTV10HelloWorld[vtable for HelloWorld]+0x74): undefined reference to `cbPlugin::NotImplemented(wxString const&) const'
:C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\bits\stl_vector.h:(.rdata$_ZTV12cbToolPlugin[vtable for cbToolPlugin]+0x74):: undefined reference to `cbPlugin::NotImplemented(wxString const&) const'
)]+0x7):: undefined reference to `_imp___ZN7Manager3GetEv'
)]+0x11):: undefined reference to `_imp___ZNK7Manager16GetPluginManagerEv'
)]+0x3c):: undefined reference to `_imp___ZN13PluginManager14RegisterPluginERK8wxStringPFP8cbPluginvEPFvS4_EPFvPiS9_S9_E'
:C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\bits\stl_vector.h:(.text$_ZN12cbToolPluginD0Ev[cbToolPlugin::~cbToolPlugin()]+0x16):: undefined reference to `cbPlugin::~cbPlugin()'
:C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\bits\stl_vector.h:(.text$_ZN12cbToolPluginD1Ev[cbToolPlugin::~cbToolPlugin()]+0x16):: undefined reference to `cbPlugin::~cbPlugin()'
:: === Build finished: 8 errors, 0 warnings ===
(http://img154.imageshack.us/img154/7245/errorsws1.png) (http://imageshack.us)
Shot at 2007-08-04
Someone please help me!!
Alright now when i go to compile code::blocks its compiles for a while but then i halts with this
:: === Code::Blocks, scintilla ===
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:531: error: no `void wxScintilla::MarkerAddSet(int, int)' member function declared in class `wxScintilla'
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:1095: error: prototype for `int wxScintilla::FindText(int, int, const wxString&, int, int*)' does not match any in class `wxScintilla'
C:\wxWidgets-2.8.4\include\wx\wxscintilla.h:2240: error: candidate is: int wxScintilla::FindText(int, int, const wxString&, int)
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:2473: error: no `void wxScintilla::SetPasteConvertEndings(bool)' member function declared in class `wxScintilla'
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:2478: error: no `bool wxScintilla::GetPasteConvertEndings()' member function declared in class `wxScintilla'
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:2483: error: no `void wxScintilla::SelectionDuplicate()' member function declared in class `wxScintilla'
C:\Documents and Settings\User\Desktop\CB_20070731_rev4338_win32\source\src\sdk\wxscintilla\src\wxscintilla.cpp:2539: error: no `int wxScintilla::GetStyleBitsNeeded()' member function declared in class `wxScintilla'
:: === Build finished: 7 errors, 0 warnings ===
There are to location for codeblocks plugins. One location is the install directory share\CodeBlocks\plugins and the other in your (user) application data appdata\codeblocks\share\codeblocks\plugins.
If you install the plugin via the menu Manage Plugins, it will be save in the appdata path. So if you have two different versions in the install dir and the app data dir this will cause problems.
So try to delete the old plugin. If this will not fix the problem check the file manifest.xml and modify the line that it looks like that.
<SdkVersion major="1" minor="11" release="11" />
PS: This problem will also appear if you try to use the cb nightly and building your own plugin. Just built cb from sources and link your plugin against the required libs.
Well, the August 3rd nightly was based on SVN revision 4346, so the best way to ensure compatibility is to download that specific source revision:
svn co svn://svn.berlios.de/codeblocks/trunk -r 4346
(Or, if using TortoiseSVN, just use 4346 instead of the HEAD revision.)
You can basically use your nightly build to build an almost-identical version from these new sources, then rebuild your plugin to link to this just-built version.