Complilatiopn problems

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
wxNewbi
Knows some wx things
Knows some wx things
Posts: 26
Joined: Mon Nov 15, 2004 11:27 pm
Location: London UK
Contact:

Complilatiopn problems

Post by wxNewbi » Thu Jan 06, 2005 12:23 am

Hello guys, I have compiled built and installed 3 version of the wx 2.5.3 gtk library for linux. two unicode library ( one debug and one without) and one standard GTK2 library with no unicode and no debug. when I try to complie my program, I get the following errors, when it is being Linked to the wx libraries

Code: Select all


g++ -o Cedit CEditFrame.o CEdit.o main.o `wx-config --libs --debug=yes `

CEdit.o(.gnu.linkonce.t._ZN8wxStringaSEPKw+0x10): In function `wxString::operator=(wchar_t const*)':
/usr/local/include/wx-2.5/wx/string.h:860: undefined reference to `wxStringBase::operator=(wchar_t const*)'
CEdit.o(.gnu.linkonce.t._Z16wxGetTranslationPKw+0x20): In function `wxGetTranslation(wchar_t const*)':
/usr/local/include/wx-2.5/wx/intl.h:558: undefined reference to `wxLocale::GetString(wchar_t const*, wchar_t const*) const'
CEdit.o(.gnu.linkonce.t._ZN12wxStringBaseC2EPKw+0x15): In function `wxStringBase::wxStringBase(wchar_t const*)':
/usr/local/include/wx-2.5/wx/string.h:316: undefined reference to `wxStringBase::InitWith(wchar_t const*, unsigned int, unsigned int)'
CEdit.o(.gnu.linkonce.r._ZTV7editBox+0x22c): undefined reference to `wxWindow::ApplyToolTip(_GtkTooltips*, wchar_t const*)'
main.o(.gnu.linkonce.r._ZTV5MyApp+0x44): undefined reference to `wxApp::Initialize(int&, wchar_t**)'
main.o(.gnu.linkonce.r._ZTV5MyApp+0x9c): undefined reference to `wxApp::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)'
collect2: ld returned 1 exit status
make: *** [Cedit] Error 1
not sure why as I didn't have this problem before I built the non unicode version. Also the unicode version throws the same error. Does any one know how I can fix this
thanks.
Keep it real, Keep it free, Keep it GPL

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Jan 06, 2005 9:27 am

Hi!
Have you tried with

g++ -o Cedit CEditFrame.o CEdit.o main.o `wx-config --libs --debug=yes --unicode=yes` ?
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

wxNewbi
Knows some wx things
Knows some wx things
Posts: 26
Joined: Mon Nov 15, 2004 11:27 pm
Location: London UK
Contact:

Post by wxNewbi » Thu Jan 06, 2005 10:06 am

Yes I have and that gives exactly the same output. I really can tell why.
Keep it real, Keep it free, Keep it GPL

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Thu Jan 06, 2005 10:42 am

Hi!
Add --cxxflags and try again. Try "wx-config --help" for more options.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Post Reply