wxGTK2.6.3 link errors Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
vsp
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Feb 21, 2005 12:52 pm

wxGTK2.6.3 link errors

Post by vsp » Sat Apr 22, 2006 11:54 am

hi

i have built my program in windows with wxwidgets 2.4.2 and it is working fine.
now i am trying to port my code with 64bit RedHat linux machine and i am using wxWidgets2.6.3, my code is compiling well and while linking i am getting following errors

Panel.o(.text+0x2f8): In function `Panel::CreateWidgets()':
: undefined reference to `wxSizer::Add(int, int, int, int, int, wxObject*)'
Panel.o(.text+0x337): In function `Panel::CreateWidgets()':
: undefined reference to `wxSizer::Add(int, int, int, int, int, wxObject*)'
Panel.o(.text+0x373): In function `Panel::CreateWidgets()':
: undefined reference to `wxSizer::Add(int, int, int, int, int, wxObject*)'
Panel.o(.text+0x502): In function `Panel::CreateWidgets()':
: undefined reference to `wxSizer::Add(int, int, int, int, int, wxObject*)'
Panel.o(.text+0x544): In function `Panel::CreateWidgets()':
: undefined reference to `wxSizer::Add(int, int, int, int, int, wxObject*)'


./ValuePanel.o(.text+0x1e55): In function `ValuePanel::CreateWidgets()':
: undefined reference to `wxTextCtrl::wxTextCtrl()'
./ValuePanel.o(.text+0x1efb): In function `ValuePanel::CreateWidgets()':
: undefined reference to `wxTextCtrl::wxTextCtrl()'
./ValuePanel.o(.text+0x1fa0): In function `ValuePanel::CreateWidgets()':
: undefined reference to `wxTextCtrl::wxTextCtrl()'
./ValuePanel.o(.text+0x2040): In function `ValuePanel::CreateWidgets()':
: undefined reference to `wxTextCtrl::wxTextCtrl()'

i have added wx/wx.h and all the necessary wx header files. and still i am getting the same errors while linking

could u help me out
thanks regards rajesh

DavidHart
Site Admin
Site Admin
Posts: 4006
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Post by DavidHart » Sat Apr 22, 2006 12:19 pm

Hi,

I don't know if you saw the replies, by phlox81 and benedicte, the last time you asked this question. But as they said, if you have the correct headers in place, and can compile OK, the problem must be in the way you are trying to link.

If you want someone to be able to answer your question, you must give us enough information. How do you compile/link your app? Do you do it from the command line, by writing something like g++ myfoo.cpp `wx-config --libs --cxxflags` -o myfoo? If so, please post the command. Or do you use a makefile that you've created (or copied from one of the samples)? If so, please post the relevant bit (probably the bit above ### Variables: ###). Or do you use an IDE to do this sort of thing? If so, say which IDE, and how it's configured.

We'd love to help, but you need to help us first. ;)

Regards,

David

Post Reply