Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: jayatk on January 26, 2006, 05:19:45 pm
-
Since I found out it's best to use the latest SDK, I'm having trouble compiling a simple plugin using the UNICODE version of Codeblocks (rev 1870) and WxWidgets 2.6.2.
Here's my error:
Linking dynamic library: MouseSearch.dll
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I don't understand why it wants to link against the non-unicode version of the wxWidgets library.
I've attached some shots of my settings which I copied from contrib plugin projects. I had no problems compiling the contrib plugins off the SVN, once I got the directories set up correctly.
#CB and #WX are setup correctly.
WX_SUFFIX = u
Linker libraries:
libcodeblocks.a (latest build)
libwxscintilla.a
libwxmsw26u.a
I know I must be doing something stupid again, but this mingw32\WxWidgets\Codeblocks development enviroment is all new to me.
[attachment deleted by admin]
-
what do you have in the "Linker" tab ?
maybe there is specified
wxmsw26
instead of
wxmsw26u
or some construct like
wxmsw26$(WX_SUFFIX)
-
Also notice that in Directores->Compiler, there is a typo: $(CB.INCLUDE)\tinyxml. It should use the syntax of global variables: $(#CB.INCLUDE)\tinyxml.
-
what do you have in the "Linker" tab ?
maybe there is specified
wxmsw26
instead of
wxmsw26u
or some construct like
wxmsw26$(WX_SUFFIX)
Here it is.
I tried changing it to just:
codeblocks
wxmsw26$(WX_SUFFIX)
wxscintilla
No go. :(
[attachment deleted by admin]
-
Also notice that in Directores->Compiler, there is a typo: $(CB.INCLUDE)\tinyxml. It should use the syntax of global variables: $(#CB.INCLUDE)\tinyxml.
I'll fix that. THanks.
-
post your projectfile here
-
I noticed the first linker options:
<Linker>
<Add library="C:\Program Files\CodeBlocks\sdk\lib\libcodeblocks.a" />
<Add library="..\..\sdk\lib\libwxmsw26.a" />
<Add directory="C:\Program Files\CodeBlocks\sdk\lib" />
</Linker>
I thought I deleted that. Same for the Compiler options up top.
I assume I need to remove that set of options?
[attachment deleted by admin]
-
Hasn't anyone noticed that in the linker options the policy is set to "Use project options only"?
Which ignores all the target settings in that page?
-
Hasn't anyone noticed that in the linker options the policy is set to "Use project options only"?
Which ignores all the target settings in that page?
I did append target options to project options in the very beginning. No difference.
However, I removed those <Linker> options and saved my project file again. Set it back to append target options....
Now my error has changed.
------------- Build: default in MouseSearch ---------------
Linking dynamic library: MouseSearch.dll
.objs\mousesearch.o: In function `GetPluginsCount':
C:/PROJECTS/CodeBlocksPluginDev/MouseSearch/mousesearch.cpp:325: undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
C:/PROJECTS/CodeBlocksPluginDev/MouseSearch/mousesearch.cpp:325: undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\mousesearch.o: In function `ZN8cbPlugin21GetConfigurationPanelEP8wxWindow':
C:/Program Files/CodeBlocks/sdk/cbplugin.h:(.text$_ZN8wxStringaSEPKc[wxString::operator=(char const*)]+0x14): undefined reference to `_imp___ZN12wxStringBaseaSEPKc'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
2 errors, 0 warnings
BTW, the code is a empty pluging generated by the Plugins wizard.
-
Hasn't anyone noticed that in the linker options the policy is set to "Use project options only"?
Which ignores all the target settings in that page?
lol :lol: that's true.
I was about to say that the screenshoots and the project file wasn't even the same project. :lol:
-
Is this better? :D
[attachment deleted by admin]
-
try this one
you have to specify the global variable CB
it works for me (tested !)
[attachment deleted by admin]
-
Now my error has changed.
When you 're getting linking errors related to wxString, it's almost always the case of unicode. So re-build your plugin but remember to set wxUSE_UNICODE in #defines.
-
Rebuild worked.
Thanks so much again!