Author Topic: Newbie startup question  (Read 5091 times)

jas

  • Guest
Newbie startup question
« on: April 25, 2009, 01:26:37 am »
Please help...

I am trying to use the nightly build to complile the wxWidgets starter project.  wxSmith was specified during setup.   Everything compiles but the link fails.  I am using wxWidgets 2.8.10.  I have verified wxWidgets build is good by using MinGW tools and the command line environment to build the minimal example.  I am on a Vista platform with XP compatibily set on the codeblocks launch.  Can someone tell me where I am going wrong?

The following is a dump of the build errors:


-------------- Clean: Debug in Hello ---------------

Cleaned "Hello - Debug"
Done.


-------------- Build: Debug in Hello ---------------

Compiling: HelloMain.cpp
Compiling: resource.rc
Compiling: HelloApp.cpp
Linking executable: bin\Debug\Hello.exe
obj\Debug\HelloMain.o: In function `ZN10HelloFrameC2EP8wxWindowi':
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxEmptyString'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxDefaultSize'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxDefaultPosition'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:65: undefined reference to `wxMenuBar::wxMenuBar()'
C:/codeblocks/workspace/Hello/HelloMain.cpp:67: undefined reference to `wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:71: undefined reference to `wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:74: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:80: undefined reference to `wxFrameBase::SetStatusBar(wxStatusBar*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:82: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:/codeblocks/workspace/Hello/HelloMain.cpp:83: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:/codeblocks/workspace/Hello/HelloMain.cpp:83: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\HelloMain.o: In function `ZN10HelloFrameC1EP8wxWindowi':
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxEmptyString'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxDefaultSize'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxDefaultPosition'
C:/codeblocks/workspace/Hello/HelloMain.cpp:64: undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:65: undefined reference to `wxMenuBar::wxMenuBar()'
C:/codeblocks/workspace/Hello/HelloMain.cpp:67: undefined reference to `wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:71: undefined reference to `wxMenuItem::wxMenuItem(wxMenu*, int, wxString const&, wxString const&, wxItemKind, wxMenu*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:74: undefined reference to `wxFrameBase::SetMenuBar(wxMenuBar*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:80: undefined reference to `wxFrameBase::SetStatusBar(wxStatusBar*)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:82: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:/codeblocks/workspace/Hello/HelloMain.cpp:83: undefined reference to `wxEVT_COMMAND_MENU_SELECTED'
C:/codeblocks/workspace/Hello/HelloMain.cpp:83: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\HelloMain.o: In function `ZN10HelloFrameD2Ev':
C:/codeblocks/workspace/Hello/HelloMain.cpp:88: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\HelloMain.o: In function `ZN10HelloFrameD1Ev':
C:/codeblocks/workspace/Hello/HelloMain.cpp:88: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\HelloMain.o: In function `ZN10HelloFrameD0Ev':
C:/codeblocks/workspace/Hello/HelloMain.cpp:88: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\HelloMain.o: In function `ZN10HelloFrame6OnQuitER14wxCommandEvent':
C:/codeblocks/workspace/Hello/HelloMain.cpp:95: undefined reference to `wxWindowBase::Close(bool)'
obj\Debug\HelloMain.o: In function `ZN10HelloFrame7OnAboutER14wxCommandEvent':
C:/codeblocks/workspace/Hello/HelloMain.cpp:101: undefined reference to `wxMessageBox(wxString const&, wxString const&, long, wxWindow*, int, int)'
obj\Debug\HelloMain.o: In function `Z41__static_initialization_and_destruction_0ii':
C:/codeblocks/workspace/Hello/HelloMain.cpp:45: undefined reference to `wxNewId()'
C:/codeblocks/workspace/Hello/HelloMain.cpp:46: undefined reference to `wxNewId()'
C:/codeblocks/workspace/Hello/HelloMain.cpp:47: undefined reference to `wxNewId()'
C:/codeblocks/workspace/Hello/HelloMain.cpp:50: undefined reference to `wxEventHashTable::wxEventHashTable(wxEventTable const&)'
C:/codeblocks/workspace/Hello/HelloMain.cpp:53: undefined reference to `wxEVT_NULL'
C:/codeblocks/workspace/Hello/HelloMain.cpp:50: undefined reference to `wxEventHashTable::~wxEventHashTable()'
obj\Debug\HelloMain.o: In function `ZNK12wxWindowBase7GetNameEv':
C:/wxWidgets-2.8.10/include/wx/window.h:(.rdata+0x28): undefined reference to `wxFrame::sm_eventTable'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN12wxStringBase10ConcatSelfEjPKc[wxStringBase::ConcatSelf(unsigned int, char const*)]+0x22): undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x7): undefined reference to `wxStringBase::npos'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x25): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN12wxEvtHandler7ConnectEiiM8wxObjectFvR7wxEventEPS0_PS_[wxEvtHandler::Connect(int, int, void (wxObject::*)(wxEvent&), wxObject*, wxEvtHandler*)]+0x3f): undefined reference to `wxEvtHandler::Connect(int, int, int, void (wxObject::*)(wxEvent&), wxObject*, wxEvtHandler*)'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN11wxStatusBarC1EP8wxWindowilRK8wxString[wxStatusBar::wxStatusBar(wxWindow*, int, long, wxString const&)]+0x43): undefined reference to `wxStatusBarBase::wxStatusBarBase()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN11wxStatusBarC1EP8wxWindowilRK8wxString[wxStatusBar::wxStatusBar(wxWindow*, int, long, wxString const&)]+0x4c): undefined reference to `vtable for wxStatusBar'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN11wxStatusBarC1EP8wxWindowilRK8wxString[wxStatusBar::wxStatusBar(wxWindow*, int, long, wxString const&)]+0x7a): undefined reference to `wxStatusBar::Create(wxWindow*, int, long, wxString const&)'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN11wxStatusBarC1EP8wxWindowilRK8wxString[wxStatusBar::wxStatusBar(wxWindow*, int, long, wxString const&)]+0x9d): undefined reference to `wxStatusBarBase::~wxStatusBarBase()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_Z16wxGetTranslationPKcS0_[wxGetTranslation(char const*, char const*)]+0x7): undefined reference to `wxGetLocale()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN6wxMenuC1El[wxMenu::wxMenu(long)]+0x53): undefined reference to `vtable for wxMenu'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN6wxMenuC1El[wxMenu::wxMenu(long)]+0x7a): undefined reference to `wxMenu::Init()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN6wxMenuC1El[wxMenu::wxMenu(long)]+0xc6): undefined reference to `wxMenuBase::~wxMenuBase()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN18wxAcceleratorArrayD1Ev[wxAcceleratorArray::~wxAcceleratorArray()]+0xd): undefined reference to `wxBaseArrayPtrVoid::~wxBaseArrayPtrVoid()'
C:/wxWidgets-2.8.10/include/wx/window.h:(.text$_ZN18wxAcceleratorArrayC1Ev[wxAcceleratorArray::wxAcceleratorArray()]+0xd): undefined reference to `wxBaseArrayPtrVoid::wxBaseArrayPtrVoid()'
Process terminated with status 1 (0 minutes, 8 seconds)
50 errors, 0 warnings
 

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: Newbie startup question
« Reply #1 on: April 25, 2009, 02:16:00 am »
Possibly you chose a monolithic build of wxWidgets in the wizard but created a multilib build? See the wxWindowsQuickRef for some hopefully helpful info.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

jas

  • Guest
Re: Newbie startup question
« Reply #2 on: April 26, 2009, 12:27:45 am »
I tried the wxPack option since I seem to be unable to get any build I make to work with the Codeblocks nightly build, although I don't have any problems with the release version.  Seems the nightly build has some issues.  When I used the wxPack libraries, CB would build the Hello program produced by the wizard, if CB could find the libraries.  It required a full path name.  It did not appear to read the wx environment variable properly.  This raises another question;  is the environment variable wx case sensitive?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7790
    • My Best Post
Re: Newbie startup question
« Reply #3 on: April 26, 2009, 03:17:17 am »
I tried the wxPack option since I seem to be unable to get any build I make to work with the Codeblocks nightly build, although I don't have any problems with the release version.  Seems the nightly build has some issues.  When I used the wxPack libraries, CB would build the Hello program produced by the wizard, if CB could find the libraries.  It required a full path name.  It did not appear to read the wx environment variable properly.  This raises another question;  is the environment variable wx case sensitive?


FYI: The wxPack works better as MultiLib than Monolithic Lib; but, wxPack can work as a single Monolithic build library.

It is NOT an "environment variable" wx, but an "global variables" see http://wiki.codeblocks.org/index.php?title=Recommended_global_variables

Tim S
« Last Edit: April 26, 2009, 03:18:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org