User forums > Help
Problem Linking Gcc : A new wxwidget project
Anonymous:
I am trying to link the "minimal" application with Code::Blocks and am receiving 40 undefined reference errors (listed below). Using MSYS and MinGW I compiled the "minimal" sample successfully, so I figured it had to be a problem with the way I have Code::Blocks setup.
Here are the steps I have taken:
Download
-----------
Download wxWidgets 2.5.3 source
Download Code::Blocks installer
Download MinGW installer
Download MSYS installer
Install
-------
Install MinGW
Install MSYS
Install Code::Blocks
Compile
---------
$ mkdir /c/Programs/wxWidgets-2.5.3/msw-release
$ cd /c/Programs/wxWidgets-2.5.3/msw-release
$ ../configure --disable-shared --disable-debug --enable-unicode --disable-universal --enable-monolithic --enable-use_gui --enable-use_opengl --enable-use_html --enable-use_xrc --enable-runtime_libs
$ make
$ cp C:\Programs\wxWidgets-2.5.4\msw-release\lib\wx\include\msw-unicode-release-static-2.5\wx\setup.h C:\Programs\wxWidgets-2.5.4\include\wx\
$ make install
NOTE: "make install" FAILED WITH ERROR 34; but the next steps still worked so I ignored it
$ cd ../samples/minimal
$ make && minimal.exe
After a short compile process the minimal application popped up fully functional (1 window, 2 menus, and an about dialog)
Code::Blocks
---------------
Created a new Code::Blocks wxWidgets project folder.
Copied minimal.cpp into the project folder.
Created a new Code::Blocks wxWidget application using a statically linked library.
Removed main.cpp from the project.
Added minimal.cpp to the project.
Project->Build options->Compiler dirs: C:\Programs\wxWidgets-2.5.4\include
Project->Build options->Linker dirs: C:\Programs\wxWidgets-2.5.4\msw-release\lib
Project->Build options->Linker options->Link libraries->Edit: wx_mswu-2.5 (from C:\Programs\wxWidgets-2.5.4\msw-release\lib\libwx_mswu-2.5.a)
Compile->Compile
Output
--------
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : U:\Programming\wxWidgetsStaticLibraryTest\
--------------------------------------------------------------------------------
Linking executable: U:\Programming\wxWidgetsStaticLibraryTest\wxWidgetsStaticLIbraryTest.exe
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0x8b9):app.cpp: undefined reference to `InitCommonControls@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0x8c3):app.cpp: undefined reference to `OleInitialize@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_app.o)(.text+0xbfc):app.cpp: undefined reference to `OleUninitialize@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_window.o)(.text+0x8aa7):window.cpp: undefined reference to `_TrackMouseEvent@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_statbr95.o)(.text+0x1a4):statbr95.cpp: undefined reference to `CreateStatusWindowW@16'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_filename.o)(.text+0x40d1):filename.cpp: undefined reference to `CoCreateInstance@20'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_filename.o)(.text+0x40f7):filename.cpp: undefined reference to `IID_IPersistFile'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x745):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x758):droptgt.cpp: undefined reference to `RegisterDragDrop@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x780):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x79f):droptgt.cpp: undefined reference to `RevokeDragDrop@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.text+0x7ae):droptgt.cpp: undefined reference to `CoLockObjectExternal@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.data+0x0):droptgt.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_droptgt.o)(.data+0x4):droptgt.cpp: undefined reference to `IID_IDropTarget'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_spinbutt.o)(.text+0x32e):spinbutt.cpp: undefined reference to `CreateUpDownControl@48'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x13d):imaglist.cpp: undefined reference to `ImageList_Create@20'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x1c5):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x215):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x26a):imaglist.cpp: undefined reference to `ImageList_Destroy@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x28e):imaglist.cpp: undefined reference to `ImageList_GetImageCount@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x2b6):imaglist.cpp: undefined reference to `ImageList_GetIconSize@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x370):imaglist.cpp: undefined reference to `ImageList_Add@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x3fb):imaglist.cpp: undefined reference to `ImageList_AddMasked@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x460):imaglist.cpp: undefined reference to `ImageList_ReplaceIcon@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x4e3):imaglist.cpp: undefined reference to `ImageList_Replace@16'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x532):imaglist.cpp: undefined reference to `ImageList_ReplaceIcon@12'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x562):imaglist.cpp: undefined reference to `ImageList_Remove@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x590):imaglist.cpp: undefined reference to `ImageList_GetImageCount@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x5fd):imaglist.cpp: undefined reference to `ImageList_SetBkColor@8'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_imaglist.o)(.text+0x63d):imaglist.cpp: undefined reference to `ImageList_Draw@24'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1139):clipbrd.cpp: undefined reference to `OleSetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1156):clipbrd.cpp: undefined reference to `OleFlushClipboard@0'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1246):clipbrd.cpp: undefined reference to `OleSetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x13a5):clipbrd.cpp: undefined reference to `OleGetClipboard@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_clipbrd.o)(.text+0x1562):clipbrd.cpp: undefined reference to `ReleaseStgMedium@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.text+0xddd):dataobj.cpp: undefined reference to `ReleaseStgMedium@4'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x0):dataobj.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x4):dataobj.cpp: undefined reference to `IID_IEnumFORMATETC'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0x8):dataobj.cpp: undefined reference to `IID_IUnknown'
C:\Programs\wxWidgets-2.5.4\msw-release\lib/libwx_mswu-2.5.a(monolib_dataobj.o)(.data+0xc):dataobj.cpp: undefined reference to `IID_IDataObject'
Process terminated with status 1 (0 minutes, 2 seconds)
40 errors, 0 warnings
HELP!
-------
I have been working this for 3 days and still haven't figured out how to compile a statically linked wxWidgets application. :( I have also tried with the release version to no avail. To top it off, I need to get SQLite working with it all on top of everything else, I am only praying that goes smoother. :(
Micah:
I just thought of adding this. It is a working Makefile for compiling the minimal sample. If I can get Code::Blocks to do everything in this Makefile it should work like a charm... only problem is I don't know how to do that. :p
--- Code: ---# =========================================================================
# This makefile was generated by
# Bakefile 0.1.7 (http://bakefile.sourceforge.net)
# Do not modify, all changes will be overwritten!
# =========================================================================
prefix = /usr/local
exec_prefix = ${prefix}
INSTALL = /bin/install -c
EXEEXT = .exe
RESCOMP = windres
SETFILE =
NM = nm
srcdir = ../../../samples/minimal
top_srcdir = ../../..
top_builddir = ../../
LDFLAGS_GUI = -mwindows
CXX = g++
CXXFLAGS = -O2 -mthreads -Wall -Wno-ctor-dtor-privacy
CPPFLAGS = -DNO_GCC_PRAGMA -I${top_builddir}lib/wx/include/msw-unicode-release-static-2.5 -I${top_srcdir}/include
LDFLAGS = -mthreads
WX_LIB_FLAVOUR =
TOOLKIT = MSW
TOOLKIT_LOWERCASE = msw
TOOLKIT_VERSION =
TOOLCHAIN_NAME = mswu-2.5
EXTRALIBS = -mthreads -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32
EXTRALIBS_GUI =
HOST_SUFFIX =
SAMPLES_RPATH_FLAG =
SAMPLES_RPATH_POSTLINK =
### Variables: ###
DESTDIR =
WX_RELEASE = 2.5
WX_VERSION = $(WX_RELEASE).4
LIBDIRNAME = $(top_builddir)lib
MINIMAL_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) -I$(srcdir) \
$(__DLLFLAG_p) -I$(srcdir)/../../samples $(CPPFLAGS) $(CXXFLAGS)
MINIMAL_OBJECTS = \
$(__minimal___win32rc) \
$(__minimal_os2_lib_res) \
minimal_minimal.o
### Conditionally set variables: ###
#CXXC = $(CXX)
CXXC = $(top_builddir)./bk-deps $(CXX)
#PORTNAME = base
PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
#WXBASEPORT = _carbon
#WXDEBUGFLAG = d
#WXDEBUGFLAG = d
WXUNICODEFLAG = u
#WXUNIVNAME = univ
#EXTRALIBS_FOR_BASE = $(EXTRALIBS)
EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
#EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
EXTRALIBS_FOR_GUI =
#__minimal___mac_setfilecmd = \
# $(SETFILE) -a C minimal$(EXEEXT)
#__minimal___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
#__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
#__WXUNIV_DEFINE_p_1 = -d __WXUNIVERSAL__
#__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__
#__DLLFLAG_p = -DWXUSINGDLL
#__DLLFLAG_p_1 = -d WXUSINGDLL
#__DLLFLAG_p_2 = --define WXUSINGDLL
COND_PLATFORM_OS2_1___minimal___os2_emxbindcmd = $(NM) minimal$(EXEEXT) | if \
grep -q pmwin.763 ; then emxbind -ep minimal$(EXEEXT) ; fi
#__minimal___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___minimal___os2_emxbindcmd)
__minimal___win32rc = minimal_sample_rc.o
#__minimal_os2_lib_res = \
# $(top_srcdir)/include/wx/os2/wx.res
#__minimal_bundle___depname = minimal_bundle
#____minimal_BUNDLE_TGT_REF_DEP = \
# minimal.app/Contents/PkgInfo
#____minimal_BUNDLE_TGT_REF_DEP = \
# minimal.app/Contents/PkgInfo
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
#__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
COND_MONOLITHIC_0___WXLIB_BASE_p = \
-lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
#__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
COND_MONOLITHIC_1___WXLIB_MONO_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
__LIB_TIFF_p \
= \
-lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_JPEG_p \
= \
-lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_PNG_p \
= \
-lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_ZLIB_p = \
-lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
#__LIB_ODBC_p = \
# -lwxodbc$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
-lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
__LIB_EXPAT_p = \
-lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(RESCOMP) -d __DARWIN__ -t APPL -d \
__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_1) -i $(srcdir) $(__DLLFLAG_p_1) -i \
$(srcdir)/../../samples -i $(top_srcdir)/include -o minimal$(EXEEXT) Carbon.r \
$(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.r sample.r
#__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1)
### Targets: ###
all: minimal$(EXEEXT) $(__minimal_bundle___depname)
install: all
uninstall:
install-strip: install
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
rm -f minimal$(EXEEXT)
rm -rf minimal.app
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
minimal$(EXEEXT): $(MINIMAL_OBJECTS) $(__minimal___win32rc)
$(CXX) -o $@ $(MINIMAL_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(__LIB_ZLIB_p) $(__LIB_ODBC_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(EXTRALIBS_FOR_GUI)
$(__minimal___mac_rezcmd)
$(__minimal___mac_setfilecmd)
$(__minimal___os2_emxbindcmd)
$(SAMPLES_RPATH_POSTLINK)
minimal.app/Contents/PkgInfo: minimal$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.rsrc $(top_srcdir)/src/mac/carbon/wxmac.icns
mkdir -p minimal.app/Contents
mkdir -p minimal.app/Contents/MacOS
mkdir -p minimal.app/Contents/Resources
sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
-e "s/EXECUTABLE/minimal/" \
-e "s/VERSION/$(WX_VERSION)/" \
$(top_srcdir)/src/mac/carbon/Info.plist.in >minimal.app/Contents/Info.plist
echo -n "APPL????" >minimal.app/Contents/PkgInfo
ln -f minimal$(EXEEXT) minimal.app/Contents/MacOS/minimal
cp -f $(LIBDIRNAME)/libwx_$(TOOLCHAIN_NAME).4.rsrc minimal.app/Contents/Resources/minimal.rsrc
cp -f $(top_srcdir)/src/mac/carbon/wxmac.icns minimal.app/Contents/Resources/wxmac.icns
#minimal_bundle: $(____minimal_BUNDLE_TGT_REF_DEP)
minimal_sample_rc.o: $(srcdir)/../../samples/sample.rc
$(RESCOMP) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2) --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples --include-dir $(top_srcdir)/include
minimal_minimal.o: $(srcdir)/minimal.cpp
$(CXXC) -c -o $@ $(MINIMAL_CXXFLAGS) $(srcdir)/minimal.cpp
# Include dependency info, if present:
-include .deps/*.d
.PHONY: all install uninstall clean distclean minimal_bundle
--- End code ---
Micah:
Yay! I got it. :)
Project->Options->Build options->Linker options->Link libraries
Added the following:
--- Code: ---rpcrt4
oleaut32
ole32
uuid
winspool
winmm
shell32
comctl32
comdlg32
ctl3d32
advapi32
wsock32
gdi32
--- End code ---
I am guessing that is a list of all the libraries wxWidgets used when initially being built (pulled from the Makefile), so I am going to add them to my default compiler options, that way they are available for all future projects.
Thanks for everyone's help! ;)
cyberkoa:
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'
--- End quote ---
I have all the same settings as before, the only different is , I do not have C:\program files\CodeBlocks 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:
MDR, I give up some weeks ago.
wx-widget are not trivial to build.
if anyone have build wx-widget dynamic & static libraries on windows with ms-toolkit 2003, please give me a url.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version