Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: gszo0 on April 18, 2006, 10:06:18 am

Title: Some linker errors
Post by: gszo0 on April 18, 2006, 10:06:18 am
I need help with some linking-time errors:

-------------- Build: default in Graf ---------------
Linking executable: Graf.exe
.objs\language.o(.text$_ZN8wxStringaSEPKc[wxString::operator=(char const*)]+0x14):language.cpp: undefined reference to `_imp___ZN12wxStringBaseaSEPKc'
.objs\language.o(.text$_ZN12wxStringBase4InitEv[wxStringBase::Init()]+0x8):language.cpp: undefined reference to `_imp__wxEmptyString'
.objs\main.o(.text+0x113):main.cpp: undefined reference to `_imp__wxFrameNameStr'
.objs\main.o(.text+0x170):main.cpp: undefined reference to `_imp__wxDefaultPosition'
.objs\main.o(.text+0x2a7):main.cpp: undefined reference to `_imp___ZN9wxMenuBarC1Ev'
.objs\main.o(.text+0x433):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x4d3):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x573):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x613):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x6b3):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x753):main.cpp: more undefined references to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_' follow
.objs\main.o(.text+0x2642):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
.objs\main.o(.text+0x2647):main.cpp: undefined reference to `_imp__wxStatusLineNameStr'
.objs\main.o(.text+0x268c):main.cpp: undefined reference to `wxFrameBase::CreateStatusBar(int, long, int, wxString const&)'
.objs\main.o(.text+0x29d6):main.cpp: undefined reference to `wxFrameBase::SetStatusText(wxString const&, int)'
.objs\main.o(.text+0x29ef):main.cpp: undefined reference to `_imp___ZN16wxMDIParentFrameD2Ev'
.objs\main.o(.text+0x2a81):main.cpp: undefined reference to `_imp__wxFrameNameStr'
.objs\main.o(.text+0x2ade):main.cpp: undefined reference to `_imp__wxDefaultPosition'
.objs\main.o(.text+0x2c15):main.cpp: undefined reference to `_imp___ZN9wxMenuBarC1Ev'
.objs\main.o(.text+0x2da1):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x2e41):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x2ee1):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x2f81):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x3021):main.cpp: undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text+0x30c1):main.cpp: more undefined references to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_' follow
.objs\main.o(.text+0x4fb0):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
.objs\main.o(.text+0x4fb5):main.cpp: undefined reference to `_imp__wxStatusLineNameStr'
.objs\main.o(.text+0x4ffa):main.cpp: undefined reference to `wxFrameBase::CreateStatusBar(int, long, int, wxString const&)'
.objs\main.o(.text+0x5344):main.cpp: undefined reference to `wxFrameBase::SetStatusText(wxString const&, int)'
.objs\main.o(.text+0x535d):main.cpp: undefined reference to `_imp___ZN16wxMDIParentFrameD2Ev'
.objs\main.o(.text+0x53c0):main.cpp: undefined reference to `_imp___ZN16wxMDIParentFrameD2Ev'
.objs\main.o(.text+0x53f6):main.cpp: undefined reference to `_imp___ZN16wxMDIParentFrameD2Ev'
.objs\main.o(.text+0x542c):main.cpp: undefined reference to `_imp___ZN16wxMDIParentFrameD2Ev'
.objs\main.o(.text$_ZN12wxStringBase10ConcatSelfEjPKc[wxStringBase::ConcatSelf(unsigned int, char const*)]+0x22):main.cpp: undefined reference to `_imp___ZN12wxStringBase10ConcatSelfEjPKcj'
.objs\main.o(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x7):main.cpp: undefined reference to `_imp___ZN12wxStringBase4nposE'
.objs\main.o(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x27):main.cpp: undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\main.o(.text$_ZN10wxMenuBase6AppendEiRK8wxStringP6wxMenuS2_[wxMenuBase::Append(int, wxString const&, wxMenu*, wxString const&)]+0x31):main.cpp: undefined reference to `_imp___ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text$_ZN10wxMenuBase15AppendSeparatorEv[wxMenuBase::AppendSeparator()]+0x39):main.cpp: undefined reference to `_imp__wxEmptyString'
.objs\main.o(.text$_ZN10wxMenuBase15AppendSeparatorEv[wxMenuBase::AppendSeparator()]+0x5c):main.cpp: undefined reference to `_imp__wxEmptyString'
.objs\main.o(.text$_ZN10wxMenuBase6AppendEiRK8wxStringS2_10wxItemKind[wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)]+0x31):main.cpp: undefined reference to `_imp___ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_'
.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x59):main.cpp: undefined reference to `_imp___ZTV6wxMenu'
.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x7e):main.cpp: undefined reference to `_imp___ZN6wxMenu4InitEv'
.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0xcc):main.cpp: undefined reference to `_imp___ZN10wxMenuBaseD2Ev'
.objs\main.o(.text$_ZN18wxAcceleratorArrayD1Ev[wxAcceleratorArray::~wxAcceleratorArray()]+0xd):main.cpp: undefined reference to `_imp___ZN18wxBaseArrayPtrVoidD2Ev'
.objs\main.o(.text$_ZN18wxAcceleratorArrayC1Ev[wxAcceleratorArray::wxAcceleratorArray()]+0xd):main.cpp: undefined reference to `_imp___ZN18wxBaseArrayPtrVoidC2Ev'
.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x3c):main.cpp: undefined reference to `_imp___ZN12wxEvtHandlerC2Ev'
.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x4d):main.cpp: undefined reference to `_imp___ZTV10wxMenuBase'
.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x9d):main.cpp: undefined reference to `_imp___ZN10wxMenuBase4InitEl'
.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x112):main.cpp: undefined reference to `_imp___ZN12wxEvtHandlerD2Ev'
.objs\main.o(.text$_ZN14wxMenuItemListD1Ev[wxMenuItemList::~wxMenuItemList()]+0x16):main.cpp: undefined reference to `_imp___ZN10wxListBaseD2Ev'
Process terminated with status 1 (0 minutes, 9 seconds)
52 errors, 0 warnings
 
I'm using wxWidgets 2.6.3 nonUnicode monolithic shared + gcc 3.4.2 + C::B 2352
I'll be pleased if someone let me know what's going on... :D
Title: Re: Some linker errors
Post by: MortenMacFly on April 18, 2006, 10:27:25 am
I need help with some linking-time errors:
Allthough I don't really know how this is related to the development of C::B (:lol:) it would be helpful if you post the full compiler log (read my sig). This would allow to check for missing libs or path settings.
With regards, Morten.
Title: Re: Some linker errors
Post by: thomas on April 18, 2006, 11:37:18 am
Quote
I'm using wxWidgets 2.6.3 nonUnicode monolithic shared + gcc 3.4.2 + C::B 2352

Probably, you have wxUSE_UNICODE defined (look in project options). Unicode/non-Unicode issues most often result in a missing wxStringBase reference.