Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: grv575 on October 22, 2005, 04:03:45 am

Title: wxscintilla unicode fixes needed
Post by: grv575 on October 22, 2005, 04:03:45 am
Hopefully someone can confirm as well but it's breaking when compiling as unicode (and wx2.6.2 unicode).  Errors:

Code
wxscintilla.cpp:2551: undefined reference to `_imp___ZNK8wxString11BeforeFirstEc'
wxscintilla.cpp:2552: undefined reference to `_imp___ZNK8wxString10AfterFirstEc'
wxscintilla.cpp:2724: undefined reference to `_imp___ZN6wxFileC1EPKcNS_8OpenModeE'
wxscintilla.cpp:2736: undefined reference to `_imp___ZN6wxFileC1EPKcNS_8OpenModeE'
wxscintilla.cpp:(.text$_ZeqRK8wxStringPKc[operator==(wxString const&, char const*)]+0x14): undefined reference to `_imp___ZNK8wxString3CmpEPKc'

E.g. what is defined in the wx dll:
_ZNK8wxString11BeforeFirstEw

So it looks like those '' char strings need to be converted to wide char (unicode) equivalents.

Title: Re: wxscintilla unicode fixes needed
Post by: David Perfors on October 24, 2005, 11:23:38 am
sorry, I can't confirm this.
Title: Re: wxscintilla unicode fixes needed
Post by: mandrav on October 24, 2005, 11:33:12 am
Try rebuilding wxscintilla. It seems you 're using a non-unicode wxscintilla DLL.
Title: Re: wxscintilla unicode fixes needed
Post by: grv575 on November 20, 2005, 06:51:36 am
Still same error :(

This is the latest cvs freshly checked out and rebuilt.

(http://www.geocities.com/grv575/unicode.jpg)
Title: Re: wxscintilla unicode fixes needed
Post by: cyberkoa on November 20, 2005, 07:18:01 am
I encounter the similiar problem yesterday (24 hours before I post this)
But just now (3 hours before I post this) , I get a fresh CVS , and fix some unicode problem in angel's sdk + annoydialog.cpp , it compile successfully .
 
WinXP-SP2 , wxwidgets-2.6.2-unicode.

Could it be your linker directory settings problem, I use RC2 , and manually enter the directories of compiler/linker/resource compiler y in the *newbuild.cbp.


Title: Re: wxscintilla unicode fixes needed
Post by: rickg22 on November 21, 2005, 08:20:46 pm
Note: Sometimes unicode errors are shown as linker errors, since the linker is looking for a function with a WCHAR as parameter but only finds functions with CHAR's, and viceversa.
Title: Re: wxscintilla unicode fixes needed
Post by: grv575 on December 15, 2005, 11:42:53 pm
Found out the problem.  It's pretty stupid since I ran into something similar and posted about it before.  You get those linker errors if you forget to change the wx/setup.h file:

//#define wxUSE_UNICODE 0
#define wxUSE_UNICODE 1

So, those errors appear if the wxUSE_UNICODE flag is not set to 1.  I'll add something to the wiki since it's the second time I've made this mistake.