Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Default Plugin Doesnt Compile
bear24rw:
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
--- Code: ---.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 ===
--- End code ---
Shot at 2007-08-04
Someone please help me!!
TDragon:
--- Quote from: bear24rw on August 05, 2007, 12:39:04 am ---i get 'codeblocks' library can't be found so i go to build options and remove it from linker list
--- End quote ---
Why on earth would you do that? Since you're developing a plugin for Code::Blocks, it stands to reason that you'd need to link with a Code::Blocks library.
You need to download the C::B sources and compile them, then set your #cb global variable to the "src" directory in the C::B sources.
bear24rw:
Compile the Code::blocks source?? oh, alright ill try that i thought you just had to have them
Thank you
bear24rw:
Alright now when i go to compile code::blocks its compiles for a while but then i halts with this
--- Code: ---:: === 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 ===
--- End code ---
mariocup:
Hi bear24rw,
please try to use mingw 3.4.5 to build codeblocks from sources, so this could solve your problem. Please rebuilt the system and delete first the precompiled header (*.gch)
Navigation
[0] Message Index
[#] Next page
Go to full version