cannot find -lwxmsw31ud, it isn't there

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Indigo
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Jan 09, 2019 7:56 pm

cannot find -lwxmsw31ud, it isn't there

Post by Indigo » Wed Jan 09, 2019 8:14 pm

Hi Guys.

I have tried for many hours to get wxWidgets to work in Codeblocks on Windows. I have tried building it and using the command line to build and run the examples in the samples folder successfully.

My problem is with codeblocks. No matter how I install wxWidgets and setup codeblocks I get the error

Code: Select all

-------------- Build: Debug in MyGui1 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\wxWidgets-3.1.2\lib\gcc510TDM_x64_dll_Dev -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib\mswu -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -o bin\Debug\MyGui1.exe obj\Debug\MyGui1App.o obj\Debug\MyGui1Main.o  obj\Debug\resource.res -mthreads  -lwxbase31ud -lwxmsw31ud_core -lwxmsw31ud_core -lwxmsw31ud -mwindows
C:/TDM-GCC-32/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
Always missing -lwxmsw31ud. This seems to be because the libwxmsw31ud.a doesn't exist. But why then, does it always try to look for it?

Building it like this works for running the samples

Code: Select all

mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
Most recently I have followed the tutorial here to run wxWidgets with prebuilt binaries and followed the steps perfectly. This resulted in the build log seen above.

I have been searching the forum and internet extensively and have spent many hours on this, I am a little out of my depth here. Please help me get this working.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3276
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: cannot find -lwxmsw31ud, it isn't there

Post by ONEEYEMAN » Wed Jan 09, 2019 8:25 pm

Hi,
It seems that you built both static and dynamic version for wxWidgets and then mix them up inside the C::B.
Please remove the C::B project and start all over from the New Project wizard.

Make sure that the options you select in C::B match exactly the options you built the library with.

Good luck.

Thank you.

Indigo
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Jan 09, 2019 7:56 pm

Re: cannot find -lwxmsw31ud, it isn't there

Post by Indigo » Wed Jan 09, 2019 10:10 pm

Thank you. I have made a little progress, as I have found new errors.

Firstly, I rebuilt wxWidgets using the following settings.

Code: Select all

mingw32-make -f makefile.gcc clean
mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
Then I created a new project in codeblocks, selected all the libraries that were present in the library folder and renamed them to include a letter d since it is a debug build. Then when I try to build it the following log is created.

Code: Select all

||=== Build: Debug in mygui2 (compiler: GNU GCC Compiler) ===|
obj\Debug\mygui2App.o||In function `[email protected]':|
F:\Scripts\codeblocks\mygui2\mygui2App.cpp|17|undefined reference to `_imp___Z7wxEntryP11HINSTANCE__S0_Pci'|
obj\Debug\mygui2App.o||In function `Z11wxCreateAppv':|
F:\Scripts\codeblocks\mygui2\mygui2App.cpp|17|undefined reference to `_imp___ZN16wxAppConsoleBase17CheckBuildOptionsEPKcS1_'|
obj\Debug\mygui2App.o||In function `ZN9mygui2App6OnInitEv':|
F:\Scripts\codeblocks\mygui2\mygui2App.cpp|23|undefined reference to `_imp___Z22wxInitAllImageHandlersv'|
obj\Debug\mygui2App.o||In function `ZN16wxAppConsoleBase22SetInitializerFunctionEPFP12wxAppConsolevE':|
C:\wxWidgets-3.1.2\include\wx\app.h|454|undefined reference to `_imp___ZN16wxAppConsoleBase12ms_appInitFnE'|
obj\Debug\mygui2App.o||In function `ZN16wxAppConsoleBase11GetInstanceEv':|
C:\wxWidgets-3.1.2\include\wx\app.h|462|undefined reference to `_imp___ZN16wxAppConsoleBase14ms_appInstanceE'|
obj\Debug\mygui2App.o||In function `ZN9mygui2AppC1Ev':|
F:\Scripts\codeblocks\mygui2\mygui2App.h|15|undefined reference to `_imp___ZN5wxAppC2Ev'|
obj\Debug\mygui2App.o||In function `ZN9mygui2AppD1Ev':|
F:\Scripts\codeblocks\mygui2\mygui2App.h|15|undefined reference to `_imp___ZN5wxAppD2Ev'|
obj\Debug\mygui2Main.o||In function `ZN11mygui2FrameC2EP8wxWindowi':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|64|undefined reference to `_imp__wxEmptyString'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|64|undefined reference to `_imp__wxDefaultSize'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|64|undefined reference to `_imp__wxDefaultPosition'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|64|undefined reference to `_imp___ZN7wxFrame6CreateEP8wxWindowiRK8wxStringRK7wxPointRK6wxSizelS4_'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|65|undefined reference to `_imp___ZN9wxMenuBarC1Ev'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|67|undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|71|undefined reference to `_imp___ZN10wxMenuItemC1EP6wxMenuiRK8wxStringS4_10wxItemKindS1_'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|74|undefined reference to `_imp___ZN11wxFrameBase10SetMenuBarEP9wxMenuBar'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|80|undefined reference to `_imp___ZN11wxFrameBase12SetStatusBarEP11wxStatusBar'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|82|undefined reference to `_imp__wxEVT_MENU'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|83|undefined reference to `_imp__wxEVT_MENU'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|55|undefined reference to `_imp___ZN7wxFrameD2Ev'|
obj\Debug\mygui2Main.o||In function `ZN11mygui2FrameD2Ev':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|87|undefined reference to `_imp___ZN7wxFrameD2Ev'|
obj\Debug\mygui2Main.o||In function `ZN11mygui2Frame6OnQuitER14wxCommandEvent':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|95|undefined reference to `_imp___ZN12wxWindowBase5CloseEb'|
obj\Debug\mygui2Main.o||In function `ZN11mygui2Frame7OnAboutER14wxCommandEvent':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|101|undefined reference to `_imp___Z12wxMessageBoxRK8wxStringS1_lP8wxWindowii'|
obj\Debug\mygui2Main.o||In function `_tcf_0':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|50|undefined reference to `_imp___ZN16wxEventHashTableD1Ev'|
obj\Debug\mygui2Main.o||In function `_static_initialization_and_destruction_0':|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|45|undefined reference to `_imp___Z7wxNewIdv'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|46|undefined reference to `_imp___Z7wxNewIdv'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|47|undefined reference to `_imp___Z7wxNewIdv'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|50|undefined reference to `_imp___ZN7wxFrame13sm_eventTableE'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|50|undefined reference to `_imp___ZN16wxEventHashTableC1ERK12wxEventTable'|
F:\Scripts\codeblocks\mygui2\mygui2Main.cpp|53|undefined reference to `_imp__wxEVT_NULL'|
obj\Debug\mygui2Main.o||In function `Z16wxGet_wxConvLibcv':|
C:\wxWidgets-3.1.2\include\wx\strconv.h|596|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-3.1.2\include\wx\strconv.h|596|undefined reference to `_imp___Z19wxGet_wxConvLibcPtrv'|
C:\wxWidgets-3.1.2\include\wx\strconv.h|596|undefined reference to `_imp__wxConvLibcPtr'|
C:\wxWidgets-3.1.2\include\wx\strconv.h|596|undefined reference to `_imp__wxConvLibcPtr'|
obj\Debug\mygui2Main.o||In function `ZN8wxString7ImplStrEPKcRK8wxMBConv':|
C:\wxWidgets-3.1.2\include\wx\string.h|362|undefined reference to `_imp___ZN8wxString4nposE'|
C:\wxWidgets-3.1.2\include\wx\string.h|362|undefined reference to `_imp___ZN8wxString10ConvertStrEPKcjRK8wxMBConv'|
obj\Debug\mygui2Main.o||In function `ZN8wxObjectaSERKS_':|
C:\wxWidgets-3.1.2\include\wx\object.h|361|undefined reference to `_imp___ZN8wxObject3RefERKS_'|
obj\Debug\mygui2Main.o||In function `ZN10wxListBaseC2E9wxKeyType':|
C:\wxWidgets-3.1.2\include\wx\list.h|448|undefined reference to `_imp___ZTV10wxListBase'|
C:\wxWidgets-3.1.2\include\wx\list.h|448|undefined reference to `_imp___ZN10wxListBase4InitE9wxKeyType'|
obj\Debug\mygui2Main.o||In function `ZN14wxEventFunctorC2Ev':|
C:\wxWidgets-3.1.2\include\wx\event.h|184|undefined reference to `_imp___ZTV14wxEventFunctor'|
obj\Debug\mygui2Main.o||In function `ZN20wxObjectEventFunctorC1EM12wxEvtHandlerFvR7wxEventEPS0_':|
C:\wxWidgets-3.1.2\include\wx\event.h|217|undefined reference to `_imp___ZTV20wxObjectEventFunctor'|
obj\Debug\mygui2Main.o||In function `ZN21wxEventTableEntryBaseC2EiiP14wxEventFunctorP8wxObject':|
C:\wxWidgets-3.1.2\include\wx\event.h|3361|undefined reference to `_imp__wxTheAssertHandler'|
C:\wxWidgets-3.1.2\include\wx\event.h|3361|undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'|
C:\wxWidgets-3.1.2\include\wx\event.h|3361|undefined reference to `_imp__wxTrapInAssert'|
C:\wxWidgets-3.1.2\include\wx\event.h|3361|undefined reference to `_imp__wxTrapInAssert'|
obj\Debug\mygui2Main.o||In function `ZN12wxEvtHandler7ConnectEiiiMS_FvR7wxEventEP8wxObjectPS_':|
C:\wxWidgets-3.1.2\include\wx\event.h|3695|undefined reference to `_imp___ZN12wxEvtHandler6DoBindEiiiP14wxEventFunctorP8wxObject'|
obj\Debug\mygui2Main.o||In function `Z16wxGetTranslationRK8wxStringS1_S1_':|
C:\wxWidgets-3.1.2\include\wx\translation.h|270|undefined reference to `_imp___ZN14wxTranslations3GetEv'|
C:\wxWidgets-3.1.2\include\wx\translation.h|272|undefined reference to `_imp___ZNK14wxTranslations19GetTranslatedStringERK8wxStringS2_S2_'|
C:\wxWidgets-3.1.2\include\wx\translation.h|278|undefined reference to `_imp___ZN14wxTranslations21GetUntranslatedStringERK8wxString'|
obj\Debug\mygui2Main.o||In function `ZNK12wxWindowBase18GetBestVirtualSizeEv':|
C:\wxWidgets-3.1.2\include\wx\window.h|525|undefined reference to `_imp___ZNK12wxWindowBase11GetBestSizeEv'|
obj\Debug\mygui2Main.o||In function `ZNK12wxWindowBase12CanBeFocusedEv':|
C:\wxWidgets-3.1.2\include\wx\window.h|738|undefined reference to `_imp___ZNK12wxWindowBase9IsEnabledEv'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 6 second(s)) ===|
This seems very similar to this guys problem: viewtopic.php?t=28334

His solution was to make sure a "Use wxWidgets DLL" box is checked. I'm assuming this is the option that is available when the project is created. In the build above this option was selected. I was curious to see what it looked like with everything the same except that box unchecked when the project is created. The following errors were found:

Code: Select all

-------------- Build: Debug in mygui3 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib\mswu -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -o bin\Debug\mygui3.exe obj\Debug\mygui3App.o obj\Debug\mygui3Main.o  obj\Debug\resource.res -mthreads  -lwxmsw31ud_richtext -lwxmsw31ud_xrc -lwxmsw31ud_aui -lwxmsw31ud_media -lwxbase31ud_net -lwxmsw31ud_gl -lwxbase31ud_xml -lwxmsw31ud_adv -lwxmsw31ud_html -lwxmsw31ud_core -lwxbase31ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -mwindows
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_statusbar.o): In function `ZNK11wxStatusBar12GetFieldRectEiR6wxRect':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/statusbar.cpp:455: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_statusbar.o): In function `ZN15wxUxThemeHandleC1EPK8wxWindowPKw':
C:\wxWidgets-3.1.2\build\msw/../../include/wx/msw/uxtheme.h:239: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_statusbar.o): In function `ZN15wxUxThemeHandleD1Ev':
C:\wxWidgets-3.1.2\build\msw/../../include/wx/msw/uxtheme.h:248: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_window.o): In function `ZN8wxWindow16MSWHandleMessageEPljjl':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3537: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3733: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3774: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3781: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3783: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:3795: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_window.o): In function `ZNK8wxWindow17MSWGetThemeColourEPKwiiNS_14MSWThemeColourE14wxSystemColour':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/window.cpp:4969: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_menuitem.o): In function `Init':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:316: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:320: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:323: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:327: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:331: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:334: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:337: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:340: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:342: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:350: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_menuitem.o): In function `ZN10wxMenuItem10OnDrawItemER4wxDCRK6wxRectN16wxOwnerDrawnBase10wxODActionENS5_10wxODStatusE':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:943: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:948: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:952: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:958: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:963: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_menuitem.o): In function `ZN10wxMenuItem16DrawStdCheckMarkEP5HDC__PK7tagRECTN16wxOwnerDrawnBase10wxODStatusE':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1181: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_menuitem.o):C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1196: more undefined references to `[email protected]' follow
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_menuitem.o): In function `ZNK10wxMenuItem14GetColourToUseEN16wxOwnerDrawnBase10wxODStatusER8wxColourS3_':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1249: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1255: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1260: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/menuitem.cpp:1266: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_uxtheme.o): In function `Z17wxUxThemeIsActivev':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/uxtheme.cpp:40: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/uxtheme.cpp:40: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_access.o): In function `ZN12wxAccessible17GetIAccessibleStdEv':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/ole/access.cpp:1806: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_anybutton.o): In function `ZNK11wxAnyButton19AdjustForBitmapSizeER6wxSize':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/anybutton.cpp:535: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_anybutton.o): In function `DrawXPBackground':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/anybutton.cpp:1127: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/anybutton.cpp:1144: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/anybutton.cpp:1151: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/anybutton.cpp:1157: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_statbox.o): In function `ZN11wxStaticBox15PaintForegroundER4wxDCRK7tagRECT':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/statbox.cpp:530: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_systhemectrl.o): In function `ZN25wxSystemThemedControlBase19DoEnableSystemThemeEbP8wxWindow':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/systhemectrl.cpp:28: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_combo.o): In function `ZN11wxComboCtrl12OnPaintEventER12wxPaintEvent':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/combo.cpp:439: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/combo.cpp:445: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/combo.cpp:451: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/combo.cpp:487: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_notebook.o): In function `ZN10wxNotebook6CreateEP8wxWindowiRK7wxPointRK6wxSizelRK8wxString':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/notebook.cpp:264: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_notebook.o): In function `ZN10wxNotebook13QueryBgBitmapEv':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/notebook.cpp:1115: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/notebook.cpp:1128: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\build\msw/../../src/msw/notebook.cpp:1143: undefined reference to `[email protected]'
C:\wxWidgets-3.1.2\lib\gcc_lib/libwxmsw31ud_core.a(corelib_msw_notebook.o): In function `ZN10wxNotebook13MSWPrintChildEP5HDC(wxWindow *)':
C:\wxWidgets-3.1.2\build\msw/../../src/msw/notebook.cpp:1203: undefined reference to `[email protected]'
Process terminated with status 1 (0 minute(s), 5 second(s))
50 error(s), 0 warning(s) (0 minute(s), 5 second(s))
 
Still a lot, but different to the first set. What can I try next?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3276
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: cannot find -lwxmsw31ud, it isn't there

Post by ONEEYEMAN » Wed Jan 09, 2019 11:00 pm

Hi,
You are building tghe library as:

Code: Select all

mingw32-make -f makefile.gcc BUILD=debug SHARED=0 MONOLITHIC=0 UNICODE=1
which means when you create a project inside C::B, you should:

1. Uncheck "Use wxWidgets DLL", since you turn off "SHARED" option.
2. Uncheck "Use Monolithic build", since you turn off "MONOLITHIC" option.
3. Check "Use debug version of the library", since you use debug build of wxWidgets.

When you do all this you won't have to rename anything - you will be able to just compile you project.
If you need to do anything extra, besides those 3 steps - you are wrong and should start over.

One more time - the project settings inside C::B has to match build settings of the wxWidgets. NO EXCEPTIONS!!!

Thank you.

Indigo
In need of some credit
In need of some credit
Posts: 3
Joined: Wed Jan 09, 2019 7:56 pm

Re: cannot find -lwxmsw31ud, it isn't there

Post by Indigo » Thu Jan 10, 2019 6:46 am

Thank you, I am getting closer now. 3 errors remain

Code: Select all

-------------- Build: Debug in mygui4 (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_lib\mswud -c F:\Scripts\codeblocks\mygui4\mygui4App.cpp -o obj\Debug\mygui4App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_lib\mswud -c F:\Scripts\codeblocks\mygui4\mygui4Main.cpp -o obj\Debug\mygui4Main.o
windres.exe -IC:\wxWidgets-3.1.2\include -IC:\wxWidgets-3.1.2\lib\gcc_lib\mswud -IC:\wxWidgets-3.1.2\include  -J rc -O coff -i F:\Scripts\CODEBL~1\mygui4\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib -LC:\wxWidgets-3.1.2\lib\gcc_lib\mswu -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -o bin\Debug\mygui4.exe obj\Debug\mygui4App.o obj\Debug\mygui4Main.o  obj\Debug\resource.res -mthreads  -lwxmsw31ud_richtext -lwxmsw31ud_xrc -lwxmsw31ud_aui -lwxmsw31ud_dbgrid -lwxbase31ud_odbc -lwxmsw31ud_media -lwxbase31ud_net -lwxmsw31ud_gl -lwxmsw31ud_qa -lwxbase31ud_xml -lwxmsw31ud_adv -lwxmsw31ud_html -lwxmsw31ud_core -lwxbase31ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -mwindows
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud_dbgrid
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxbase31ud_odbc
C:/Program Files (x86)/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/5.1.0/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw31ud_qa
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 5 second(s))
4 error(s), 0 warning(s) (0 minute(s), 5 second(s))
The library files it is looking for are not present in the library folder :?

User avatar
doublemax
Moderator
Moderator
Posts: 13601
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: cannot find -lwxmsw31ud, it isn't there

Post by doublemax » Thu Jan 10, 2019 11:10 am

dbgrid and odbc existed in wx2.8.x, but were removed, because they were old and unmaintained. There is no equivalent in wx3.x. If you don't need them, just remove them from the list of linked libraries.

But if you're trying to build an existing project based on wx2.8.x that requires them, you can't use wx3.x and have to stick with 2.8.12.

The "qa" lib (wxmsw31ud_qa) contains wxDebugReport that still exists in wx3.1, so it should be there.
Use the source, Luke!

Post Reply