Author Topic: Problem Linking Gcc : A new wxwidget project  (Read 30564 times)

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #15 on: April 04, 2005, 03:29:46 am »
Hi all, I face the similar problem after uninstalling older version and install the beta 6.0 . But this time,the linker error message seems like related to wxwidgets

Quote

C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x1b):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x41):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x49):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x94):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x2f3):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x30f):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x335):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x33d):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x388):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x5e7):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x608):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x63c):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x670):main.cpp: undefined reference to `wxFrame::~wxFrame()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x6a3):main.cpp: undefined reference to `wxWindowBase::Close(bool)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x725):main.cpp: undefined reference to `wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x75d):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x776):main.cpp: undefined reference to `wxNewId()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x7cc):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x80a):main.cpp: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x847):main.cpp: undefined reference to `wxEVT_NULL'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata+0x0):main.cpp: undefined reference to `wxFrame::sm_eventTable'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBase6AppendEiRK8wxStringS2_10wxItemKind[wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)]+0x31):main.cpp: undefined reference to `wxMenuItemBase::New(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x7):main.cpp: undefined reference to `wxGetLocale()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2a):main.cpp: undefined reference to `wxLocale::GetString(char const*, char const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x24):main.cpp: undefined reference to `vtable for wxMenu'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN6wxMenuC1ERK8wxStringl[wxMenu::wxMenu(wxString const&, long)]+0x3d):main.cpp: undefined reference to `wxMenu::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN18wxAcceleratorArrayC1Ev[wxAcceleratorArray::wxAcceleratorArray()]+0xd):main.cpp: undefined reference to `wxBaseArrayPtrVoid::wxBaseArrayPtrVoid()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0xd):main.cpp: undefined reference to `wxEvtHandler::wxEvtHandler()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x16):main.cpp: undefined reference to `vtable for wxMenuBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxMenuBaseC2ERK8wxStringl[wxMenuBase::wxMenuBase(wxString const&, long)]+0x53):main.cpp: undefined reference to `wxMenuBase::Init(long)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x16):main.cpp: undefined reference to `vtable for wxListBase'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN10wxListBaseC2E9wxKeyType[wxListBase::wxListBase(wxKeyType)]+0x28):main.cpp: undefined reference to `wxListBase::Init(wxKeyType)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxObjectC2Ev[wxObject::wxObject()]+0x8):main.cpp: undefined reference to `vtable for wxObject'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxString4InitEv[wxString::Init()]+0x7):main.cpp: undefined reference to `wxEmptyString'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0xd):main.cpp: undefined reference to `wxFrameBase::wxFrameBase()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x16):main.cpp: undefined reference to `vtable for wxFrame'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x21):main.cpp: undefined reference to `wxFrame::Init()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN7wxFrameC2EP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_[wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)]+0x5d):main.cpp: undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text$_ZN8wxStringC1EPKcj[wxString::wxString(char const*, unsigned int)]+0x2c):main.cpp: undefined reference to `wxString::InitWith(char const*, unsigned int, unsigned int)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x14):main.cpp: undefined reference to `wxObject::CreateRefData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x18):main.cpp: undefined reference to `wxObject::CloneRefData(wxObjectRefData const*) const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x1c):main.cpp: undefined reference to `wxEvtHandler::ProcessEvent(wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x20):main.cpp: undefined reference to `wxEvtHandler::SearchEventTable(wxEventTable&, wxEvent&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x28):main.cpp: undefined reference to `wxEvtHandler::DoSetClientObject(wxClientData*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x2c):main.cpp: undefined reference to `wxEvtHandler::DoGetClientObject() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x30):main.cpp: undefined reference to `wxEvtHandler::DoSetClientData(void*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x34):main.cpp: undefined reference to `wxEvtHandler::DoGetClientData() const'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x38):main.cpp: undefined reference to `wxTopLevelWindowBase::Destroy()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x3c):main.cpp: undefined reference to `wxWindow::SetTitle(wxString const&)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x40):main.cpp: undefined reference to `wxWindow::GetTitle() const'


I have all the same settings as before, the only different is , I do not have C:\program files\CodeBlocks\lib as my Linker Dir  because I could not find this directory in this new version.

I suppose it should be the linking problem with wxwidgets.

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #16 on: April 05, 2005, 07:03:52 pm »
Anybody have the idea ?  I have tried a few way , even the I copy the configuration from an older version , the same problem occur .

I wonder is the bugs of beta6 or not , it seems like cannot link to the wxmsd  library.

I just manage to solve the link problem but after upgrading code block, another link problem arise.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4306
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #17 on: April 05, 2005, 07:48:07 pm »
Have you tried re-building? Older object files may lurk there and fail linking.
Also, have you added the necessary link libraries in the project's build options? Note that the order the libraries appear, matters...
Post the *full* compile log if you want someone to help you. To enable full logging, go to "Settings/Configure plugins/Compiler", switch to the "Other" tab and select full logging.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #18 on: April 06, 2005, 05:55:26 am »
thank yiannis.
I hv tried re-build it give the same result
Quote

C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x1b):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x41):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x49):main.cpp: undefined reference to `wxDefaultPosition'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x94):main.cpp: undefined reference to `wxMenuBar::wxMenuBar()'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x2f3):main.cpp: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x30f):main.cpp: undefined reference to `wxFrameNameStr'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x335):main.cpp: undefined reference to `wxDefaultSize'
C:\Documents and Settings\Administrator.XERUS-01.000\My Documents\My Projects\testwx\.objs\main.o(.text+0x33d):main.cpp: undefined reference to `wxDefaultPosition'
....

Anyway , I just manage to solve the problem by uninstalling (with remove old configuration) and reinstall code-block


FYI, I have tried to uninstall (without removing old configuration) and reinstall but cannot solve this problem.

I suspect any of the old settings / file in c:\program files\codeblock cause this problem.

Anyway , hurray again .. I am on the way again ... yeah ..

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4306
    • Code::Blocks IDE
Problem Linking Gcc : A new wxwidget project
« Reply #19 on: April 06, 2005, 09:10:54 am »
That's why I asked you for your full compile log. The compiler commands have changed in beta6 and you needed to remove the beta5 configuration first. I know I should make a note of it somewhere...

Just for anyone else reading this, there is no need to uninstall codeblocks just to clear its configuration. You can launch codeblocks once with the command line argument "--clear-configuration". It does exactly the same.

Anyway, I 'm glad you got it working.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline cyberkoa

  • Plugin developer
  • Almost regular
  • ****
  • Posts: 145
    • http://
Problem Linking Gcc : A new wxwidget project
« Reply #20 on: April 11, 2005, 08:36:39 pm »
Quote from: mandrav
That's why I asked you for your full compile log. The compiler commands have changed in beta6 and you needed to remove the beta5 configuration first. I know I should make a note of it somewhere...

Just for anyone else reading this, there is no need to uninstall codeblocks just to clear its configuration. You can launch codeblocks once with the command line argument "--clear-configuration". It does exactly the same.

Anyway, I 'm glad you got it working.

Yiannis.


Thanks. Sorry for not putting the full compile log  ..
I have tried the --clear-configuration in another PC , it works .

Thanks again ..

Anonymous

  • Guest
Problem Linking Gcc : A new wxwidget project
« Reply #21 on: April 18, 2005, 04:13:50 pm »
there is an easy way to build wxWidgets programs on windows:
1/ install Devcpp 4992 :)
2/ use its webupdate to get all files that wxWidgets needs.
3/ create a wxWidgets in C:Bs, and set compiler/linker directorys to c:\dev-cpp\include and c:\dev-cpp\lib
4/ dont forget set linker options: wxmsw, uuid, ole32, wsock32, oleaut32, comctl32, advapi32, glu32, winspool,
    winmm, odbc32, ctl3d32 (there may be something not use)

it's my way to build wxWidget, hope it helps you.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Problem Linking Gcc : A new wxwidget project
« Reply #22 on: April 18, 2005, 09:32:30 pm »
Well, with the upcoming 1.0 Beta 7.1, there won't be a need to edit the libarires manually. I just modified the wxWindows template to do so ;-)

Now regarding the devpacks um...  well...  :roll: We have to work on that.