Author Topic: Please help with wxWidgets 3.0.2 and GNU compiler  (Read 12136 times)

Offline codeman_nz

  • Single posting newcomer
  • *
  • Posts: 5
Please help with wxWidgets 3.0.2 and GNU compiler
« on: December 07, 2014, 08:28:52 pm »
I am at my wits end and I have no idea how to fix this.

I built wxidgets using these commands:
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=debug UNICODE=0 SHARED=0
mingw32-make -f makefile.gcc CXXFLAGS="-std=gnu++11" BUILD=release UNICODE=0 SHARED=0

and then I created a new wxwidgets project.  I chose None as my preferred builder and frame based application type and I did not select any configuration settings.  But when I compile I get a whole bunch of undefined reference errors.  Full build log below:


-------------- Clean: Debug in test (compiler: GNU GCC Compiler)---------------

Cleaned "test - Debug"

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

windres.exe -IC:\wxWidgets-3.0.2\include -IC:\wxWidgets-3.0.2\lib\gcc_lib\mswd -J rc -O coff -i C:\Users\snolan\Desktop\test\resource.rc -o obj\Debug\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.0.2\lib\gcc_lib\mswd -IC:\wxWidgets-3.0.2\include -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\common" -c C:\Users\snolan\Desktop\test\testApp.cpp -o obj\Debug\testApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__ -IC:\wxWidgets-3.0.2\lib\gcc_lib\mswd -IC:\wxWidgets-3.0.2\include -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\common" -c C:\Users\snolan\Desktop\test\testMain.cpp -o obj\Debug\testMain.o
mingw32-g++.exe -LC:\wxWidgets-3.0.2\lib\gcc_lib -LC:\Users\snolan\Downloads\lib -o bin\Debug\test.exe  obj\Debug\testApp.o obj\Debug\testMain.o obj\Debug\resource.res -mthreads  -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lwxmsw30d_core -lwxbase30d -lwxpngd -lwxzlibd -mwindows
obj\Debug\testApp.o: In function `WinMain@16':
C:/Users/snolan/Desktop/test/testApp.cpp:21: undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj\Debug\testApp.o: In function `Z11wxCreateAppv':
C:/Users/snolan/Desktop/test/testApp.cpp:21: undefined reference to `wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
obj\Debug\testApp.o: In function `ZN7testApp6OnInitEv':
C:/Users/snolan/Desktop/test/testApp.cpp:26: undefined reference to `wxIcon::wxIcon(wxString const&, wxBitmapType, int, int)'
C:/Users/snolan/Desktop/test/testApp.cpp:26: undefined reference to `wxTopLevelWindowBase::SetIcon(wxIcon const&)'
C:/Users/snolan/Desktop/test/testApp.cpp:26: undefined reference to `wxIcon::~wxIcon()'
C:/Users/snolan/Desktop/test/testApp.cpp:26: undefined reference to `wxIcon::~wxIcon()'
obj\Debug\testApp.o: In function `Z16wxGet_wxConvLibcv':
C:/wxWidgets-3.0.2/include/wx/strconv.h:576: undefined reference to `wxConvLibcPtr'
C:/wxWidgets-3.0.2/include/wx/strconv.h:576: undefined reference to `wxGet_wxConvLibcPtr()'
C:/wxWidgets-3.0.2/include/wx/strconv.h:576: undefined reference to `wxConvLibcPtr'
C:/wxWidgets-3.0.2/include/wx/strconv.h:576: undefined reference to `wxConvLibcPtr'
obj\Debug\testApp.o: In function `ZN8wxString7ImplStrEPKcRK8wxMBConv':
C:/wxWidgets-3.0.2/include/wx/string.h:477: undefined reference to `wxString::npos'
C:/wxWidgets-3.0.2/include/wx/string.h:477: undefined reference to `wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
obj\Debug\testApp.o: In function `ZN8wxObjectaSERKS_':
C:/wxWidgets-3.0.2/include/wx/object.h:374: undefined reference to `wxObject::Ref(wxObject const&)'
obj\Debug\testApp.o: In function `ZN23wxCriticalSectionLockerC1ER17wxCriticalSection':
C:/wxWidgets-3.0.2/include/wx/thread.h:307: undefined reference to `wxCriticalSection::Enter()'
obj\Debug\testApp.o: In function `ZN23wxCriticalSectionLockerD1Ev':
C:/wxWidgets-3.0.2/include/wx/thread.h:312: undefined reference to `wxCriticalSection::Leave()'
obj\Debug\testApp.o: In function `ZN12wxEvtHandler9TryParentER7wxEvent':
C:/wxWidgets-3.0.2/include/wx/event.h:3685: undefined reference to `wxEvtHandler::DoTryApp(wxEvent&)'
obj\Debug\testApp.o: In function `Z16wxGetTranslationRK8wxStringS1_':
C:/wxWidgets-3.0.2/include/wx/translation.h:246: undefined reference to `wxTranslations::Get()'
C:/wxWidgets-3.0.2/include/wx/translation.h:248: undefined reference to `wxTranslations::GetTranslatedString(wxString const&, wxString const&) const'
C:/wxWidgets-3.0.2/include/wx/translation.h:254: undefined reference to `wxTranslations::GetUntranslatedString(wxString const&)'
obj\Debug\testApp.o: In function `ZN16wxAppConsoleBase22SetInitializerFunctionEPFP12wxAppConsolevE':
C:/wxWidgets-3.0.2/include/wx/app.h:431: undefined reference to `wxAppConsoleBase::ms_appInitFn'
obj\Debug\testApp.o: In function `ZN16wxAppConsoleBase11GetInstanceEv':
C:/wxWidgets-3.0.2/include/wx/app.h:439: undefined reference to `wxAppConsoleBase::ms_appInstance'
obj\Debug\testApp.o: In function `ZNK12wxWindowBase18GetBestVirtualSizeEv':
C:/wxWidgets-3.0.2/include/wx/window.h:530: undefined reference to `wxWindowBase::GetBestSize() const'
obj\Debug\testApp.o: In function `ZNK12wxWindowBase12CanBeFocusedEv':
C:/wxWidgets-3.0.2/include/wx/window.h:744: undefined reference to `wxWindowBase::IsEnabled() const'
obj\Debug\testApp.o: In function `ZN12wxWindowBase25ProcessWindowEventLocallyER7wxEvent':
C:/wxWidgets-3.0.2/include/wx/window.h:876: undefined reference to `wxEvtHandler::ProcessEventLocally(wxEvent&)'
obj\Debug\testApp.o: In function `ZNK12wxWindowBase10HasCaptureEv':
C:/wxWidgets-3.0.2/include/wx/window.h:996: undefined reference to `wxWindowBase::GetCapture()'
obj\Debug\testApp.o: In function `ZNK12wxWindowBase20GetDefaultAttributesEv':
C:/wxWidgets-3.0.2/include/wx/window.h:1067: undefined reference to `wxWindowBase::GetClassDefaultAttributes(wxWindowVariant)'
obj\Debug\testApp.o: In function `ZNK12wxWindowBase19DoGetBestClientSizeEv':
C:/wxWidgets-3.0.2/include/wx/window.h:1746: undefined reference to `wxDefaultSize'
C:/wxWidgets-3.0.2/include/wx/window.h:1746: undefined reference to `wxDefaultSize'
obj\Debug\testApp.o: In function `ZN12wxWindowBase18SetInitialBestSizeERK6wxSize':
C:/wxWidgets-3.0.2/include/wx/window.h:1874: undefined reference to `wxWindowBase::SetInitialSize(wxSize const&)'
obj\Debug\testApp.o: In function `ZN8wxWindowC2Ev':
C:/wxWidgets-3.0.2/include/wx/msw/window.h:40: undefined reference to `wxWindowBase::wxWindowBase()'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:40: undefined reference to `vtable for wxWindow'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:40: undefined reference to `wxWindow::Init()'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:40: undefined reference to `wxWindowBase::~wxWindowBase()'
obj\Debug\testApp.o: In function `ZN8wxWindow14ShowWithEffectE12wxShowEffectj':
C:/wxWidgets-3.0.2/include/wx/msw/window.h:76: undefined reference to `wxWindow::MSWShowWithEffect(bool, wxShowEffect, unsigned int)'
obj\Debug\testApp.o: In function `ZN8wxWindow14HideWithEffectE12wxShowEffectj':
C:/wxWidgets-3.0.2/include/wx/msw/window.h:81: undefined reference to `wxWindow::MSWShowWithEffect(bool, wxShowEffect, unsigned int)'
obj\Debug\testApp.o: In function `ZN8wxWindow20MSWEndDeferWindowPosEv':
C:/wxWidgets-3.0.2/include/wx/msw/window.h:697: undefined reference to `wxDefaultPosition'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:697: undefined reference to `wxDefaultPosition'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:698: undefined reference to `wxDefaultSize'
C:/wxWidgets-3.0.2/include/wx/msw/window.h:698: undefined reference to `wxDefaultSize'
obj\Debug\testApp.o: In function `ZN20wxTopLevelWindowBase8IsActiveEv':
C:/wxWidgets-3.0.2/include/wx/toplevel.h:226: undefined reference to `wxWindowBase::FindFocus()'
C:/wxWidgets-3.0.2/include/wx/toplevel.h:226: undefined reference to `wxWindowBase::IsDescendant(wxWindowBase*) const'
obj\Debug\testApp.o: In function `ZN7wxFrame19MSWTranslateMessageEP6tagMSG':
C:/wxWidgets-3.0.2/include/wx/msw/frame.h:94: undefined reference to `wxFrame::MSWDoTranslateMessage(wxFrame*, tagMSG*)'
obj\Debug\testApp.o: In function `ZN20wxMDIParentFrameBaseD1Ev':
C:/wxWidgets-3.0.2/include/wx/mdi.h:58: undefined reference to `wxFrame::~wxFrame()'
C:/wxWidgets-3.0.2/include/wx/mdi.h:58: undefined reference to `wxFrame::~wxFrame()'
obj\Debug\testApp.o: In function `ZN21wxMDIClientWindowBaseD1Ev':
C:/wxWidgets-3.0.2/include/wx/mdi.h:322: undefined reference to `wxWindow::~wxWindow()'
obj\Debug\testApp.o: In function `ZN17wxMDIClientWindowC1Ev':
C:/wxWidgets-3.0.2/include/wx/msw/mdi.h:242: undefined reference to `vtable for wxMDIClientWindow'
obj\Debug\testApp.o: In function `ZN20wxMDIParentFrameBase9TryBeforeER7wxEvent':
C:/wxWidgets-3.0.2/include/wx/mdi.h:384: undefined reference to `wxEVT_MENU'
C:/wxWidgets-3.0.2/include/wx/mdi.h:385: undefined reference to `wxEVT_UPDATE_UI'
C:/wxWidgets-3.0.2/include/wx/mdi.h:394: undefined reference to `wxWindowBase::IsDescendant(wxWindowBase*) const'
C:/wxWidgets-3.0.2/include/wx/mdi.h:402: undefined reference to `wxWindowBase::TryBefore(wxEvent&)'
Process terminated with status 1 (0 minute(s), 7 second(s))
50 error(s), 0 warning(s) (0 minute(s), 7 second(s))
 

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #1 on: December 07, 2014, 10:05:35 pm »
I guess you'll have to add the wx libraries to the linker options that provide the missing symbols.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline codeman_nz

  • Single posting newcomer
  • *
  • Posts: 5
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #2 on: December 08, 2014, 12:58:08 am »
Well I just rebuilt wxwidgets as a monolithic library with unicode support and tried that but still get the same errors.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #3 on: December 08, 2014, 08:03:45 pm »
Well I just rebuilt wxwidgets as a monolithic library with unicode support and tried that but still get the same errors.

Then I suggest you use the newly built wxWidgets because if you really got the same errors you did NOT use it.

Edit: Without a full build log being posted you are just wasting everybody time with your posts.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Edit2: Also post your configuration settings!!! The fact you did NOT choose any DOES NOT mean they are not settings!!!

Tim S.
« Last Edit: December 08, 2014, 08:07:50 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline codeman_nz

  • Single posting newcomer
  • *
  • Posts: 5
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #4 on: December 09, 2014, 08:31:56 pm »
I did use it.  I can't count the number of times I have rebuilt it and use the newly built version but still get the same errors.  here is the build output:

-------------- Clean: Release in test (compiler: GNU GCC Compiler)---------------

Cleaned "test - Release"

-------------- Build: Release in test (compiler: GNU GCC Compiler)---------------

windres.exe -IC:\wxWidgets-3.0.2\include -IC:\wxWidgets-3.0.2\lib\gcc_dll\mswu -J rc -O coff -i C:\Users\snolan\Desktop\test\resource.rc -o obj\Release\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -IC:\wxWidgets-3.0.2\include -IC:\wxWidgets-3.0.2\lib\gcc_dll\mswu -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\common" -c C:\Users\snolan\Desktop\test\testApp.cpp -o obj\Release\testApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -IC:\wxWidgets-3.0.2\include -IC:\wxWidgets-3.0.2\lib\gcc_dll\mswu -I"C:\Program Files (x86)\CodeBlocks\MinGW\include\common" -c C:\Users\snolan\Desktop\test\testMain.cpp -o obj\Release\testMain.o
mingw32-g++.exe -LC:\wxWidgets-3.0.2\lib\gcc_dll -LC:\Users\snolan\Downloads\lib -o bin\Release\test.exe  obj\Release\testApp.o obj\Release\testMain.o obj\Release\resource.res -s -mthreads  -lwxmsw30u -mwindows
obj\Release\testApp.o:testApp.cpp:(.text+0x4c): undefined reference to `wxAppConsoleBase::CheckBuildOptions(char const*, char const*)'
obj\Release\testApp.o:testApp.cpp:(.text+0x6b): undefined reference to `wxApp::wxApp()'
obj\Release\testApp.o:testApp.cpp:(.text+0xf3): undefined reference to `wxEntry(HINSTANCE__*, HINSTANCE__*, char*, int)'
obj\Release\testApp.o:testApp.cpp:(.text+0x101): undefined reference to `wxAppConsoleBase::ms_appInstance'
obj\Release\testApp.o:testApp.cpp:(.text+0x16f): undefined reference to `wxConvLibcPtr'
obj\Release\testApp.o:testApp.cpp:(.text+0x180): undefined reference to `wxString::npos'
obj\Release\testApp.o:testApp.cpp:(.text+0x19e): undefined reference to `wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
obj\Release\testApp.o:testApp.cpp:(.text+0x1b3): undefined reference to `wxPrivate::GetUntypedNullData()'
obj\Release\testApp.o:testApp.cpp:(.text+0x1d2): undefined reference to `wxPrivate::GetUntypedNullData()'
obj\Release\testApp.o:testApp.cpp:(.text+0x203): undefined reference to `wxPrivate::GetUntypedNullData()'
obj\Release\testApp.o:testApp.cpp:(.text+0x236): undefined reference to `wxPrivate::GetUntypedNullData()'
obj\Release\testApp.o:testApp.cpp:(.text+0x267): undefined reference to `wxPrivate::GetUntypedNullData()'
obj\Release\testApp.o:testApp.cpp:(.text+0x27a): undefined reference to `wxTranslations::Get()'
obj\Release\testApp.o:testApp.cpp:(.text+0x29d): undefined reference to `wxTranslations::GetTranslatedString(wxString const&, wxString const&) const'
obj\Release\testApp.o:testApp.cpp:(.text+0x374): undefined reference to `wxIcon::wxIcon(wxString const&, wxBitmapType, int, int)'
obj\Release\testApp.o:testApp.cpp:(.text+0x38c): undefined reference to `wxTopLevelWindowBase::SetIcon(wxIcon const&)'
obj\Release\testApp.o:testApp.cpp:(.text+0x39e): undefined reference to `wxIcon::~wxIcon()'
obj\Release\testApp.o:testApp.cpp:(.text+0x436): undefined reference to `wxTranslations::GetUntranslatedString(wxString const&)'
obj\Release\testApp.o:testApp.cpp:(.text+0x4a8): undefined reference to `wxGet_wxConvLibcPtr()'
obj\Release\testApp.o:testApp.cpp:(.text+0x4ad): undefined reference to `wxConvLibcPtr'
obj\Release\testApp.o:testApp.cpp:(.text+0x509): undefined reference to `wxIcon::~wxIcon()'
obj\Release\testApp.o:testApp.cpp:(.text$_ZNK12wxWindowBase19DoGetBestClientSizeEv[__ZNK12wxWindowBase19DoGetBestClientSizeEv]+0xe0000011): undefined reference to `wxDefaultSize'
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: obj\Release\testApp.o: bad reloc address 0x1 in section `.text$_ZNK12wxWindowBase19DoGetBestClientSizeEv[__ZNK12wxWindowBase19DoGetBestClientSizeEv]'
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 6 second(s))
22 error(s), 0 warning(s) (0 minute(s), 6 second(s))
 
Here is the project file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
   <FileVersion major="1" minor="6" />
   <Project>
      <Option title="test" />
      <Option pch_mode="2" />
      <Option compiler="gcc" />
      <Build>
         <Target title="Release">
            <Option output="bin/Release/test" prefix_auto="1" extension_auto="1" />
            <Option object_output="obj/Release/" />
            <Option type="0" />
            <Option compiler="gcc" />
            <Option projectLinkerOptionsRelation="2" />
            <Compiler>
               <Add option="-O2" />
               <Add directory="C:/wxWidgets-3.0.2/lib/gcc_dll/mswu" />
            </Compiler>
            <ResourceCompiler>
               <Add directory="C:/wxWidgets-3.0.2/lib/gcc_dll/mswu" />
            </ResourceCompiler>
            <Linker>
               <Add option="-s" />
               <Add library="libwxmsw30u.a" />
               <Add directory="C:/wxWidgets-3.0.2/lib/gcc_dll" />
            </Linker>
         </Target>
      </Build>
      <Compiler>
         <Add option="-pipe" />
         <Add option="-mthreads" />
         <Add option="-D__GNUWIN32__" />
         <Add option="-D__WXMSW__" />
         <Add option="-DWXUSINGDLL" />
         <Add option="-DwxUSE_UNICODE" />
         <Add option="-Wall" />
         <Add directory="C:/wxWidgets-3.0.2/include" />
      </Compiler>
      <ResourceCompiler>
         <Add directory="C:/wxWidgets-3.0.2/include" />
      </ResourceCompiler>
      <Linker>
         <Add option="-mthreads" />
      </Linker>
      <Unit filename="resource.rc">
         <Option compilerVar="WINDRES" />
      </Unit>
      <Unit filename="testApp.cpp" />
      <Unit filename="testApp.h" />
      <Unit filename="testMain.cpp" />
      <Unit filename="testMain.h" />
      <Extensions>
         <code_completion />
         <envvars />
         <debugger />
         <lib_finder disable_auto="1" />
      </Extensions>
   </Project>
</CodeBlocks_project_file>

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #5 on: December 09, 2014, 10:40:28 pm »
Did you build wxWidgets with the same exact compiler you are using to build the CB project?

I will download the wxWidgets 3.0.2 version when I have time; hopefully tonight to verify it builds.

The MinGW GCC version you are using is 4.8.1; and, I am guessing it came with CB, is this correct?
What version of CB are you using; so I can duplicate that also? 

I have started building wx 3.0.2
Using
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS="-std=gnu++11 -fno-keep-inline-dllexport" >log.txt 2>&1

The VENDOR=cb, USE_XRC=1, and USE_OPENGL=1 should NOT make a real difference in the build.
The main difference will likely be in the values of SHARED, MONOLITHIC, BUILD, UNICODE, and CXXFLAGS.

I have a old 32 bit Windows 7 Computer it tends to take 45 minutes just to link the wxWidgets DLL.

Edit3: IIRC, The "-fno-keep-inline-dllexport" stops the link from failing with out of memory error.

Edit4: My build log with the error that happens since my wx is still building.
Code
-------------- Build: ReleaseWin32 in testwx302 (compiler: CodeBlocks_13_12_MinGW)---------------

windres.exe -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -J rc -O coff -i C:\Users\stahta01\TESTWX~1\resource.rc -o obj\ReleaseWin32\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -c C:\Users\stahta01\testwx302\testwx302App.cpp -o obj\ReleaseWin32\testwx302App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -c C:\Users\stahta01\testwx302\testwx302Main.cpp -o obj\ReleaseWin32\testwx302Main.o
mingw32-g++.exe -LC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll -o bin\ReleaseWin32\testwx302.exe  obj\ReleaseWin32\testwx302App.o obj\ReleaseWin32\testwx302Main.o obj\ReleaseWin32\resource.res -s -mthreads  -lwxmsw30u -mwindows
c:/program files/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lwxmsw30u

Edit: These are global compiler settings I added in the past to do
-Wmissing-include-dirs         Gives extra warnings
-Wno-unused-local-typedefs Reduces some useless warnings

Edit last: It built and ran for me with the default CB code for wxFrame build.

Tim S.

« Last Edit: December 10, 2014, 12:35:29 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #6 on: December 09, 2014, 11:14:47 pm »
I just thought of the newbie mistake you likely made.

When changing from MONOLITHIC=0 to MONOLITHIC=1 you must manually delete many build file in addition to doing a make clean.

The places I remember you have to delete are the folders under build\msw named like this one gcc_mswudll.

Tim S.
   
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #7 on: December 10, 2014, 12:33:56 am »
Things that look wrong or different in your build log.

Code
-I"C:\Program Files (x86)\CodeBlocks\MinGW\include\common"

Code
-LC:\Users\snolan\Downloads\lib

Tim S.
« Last Edit: December 10, 2014, 06:50:49 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #8 on: December 10, 2014, 12:38:02 am »
Working build of wxFrame based, DLL, Monolithic, Unicode
OS: Windows 7 32 bit.
wxWidgets: 3.0.2
CB: 13.12
MinGW GCC: gcc version 4.8.1 (tdm-2)

Code
-------------- Clean: ReleaseWin32 in testwx302 (compiler: CodeBlocks_13_12_MinGW)---------------

Cleaned "testwx302 - ReleaseWin32"

-------------- Build: ReleaseWin32 in testwx302 (compiler: CodeBlocks_13_12_MinGW)---------------

windres.exe -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -J rc -O coff -i C:\Users\stahta01\TESTWX~1\resource.rc -o obj\ReleaseWin32\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -c C:\Users\stahta01\testwx302\testwx302App.cpp -o obj\ReleaseWin32\testwx302App.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -Wall -O2 -Wmissing-include-dirs -Wno-unused-local-typedefs -IC:\wxMSW-3.0\wxWidgets-3.0.2\include -IC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll\mswu -c C:\Users\stahta01\testwx302\testwx302Main.cpp -o obj\ReleaseWin32\testwx302Main.o
mingw32-g++.exe -LC:\wxMSW-3.0\wxWidgets-3.0.2\lib\gcc_dll -o bin\ReleaseWin32\testwx302.exe  obj\ReleaseWin32\testwx302App.o obj\ReleaseWin32\testwx302Main.o obj\ReleaseWin32\resource.res -s -mthreads  -lwxmsw30u -mwindows
Output file is bin\ReleaseWin32\testwx302.exe with size 564.00 KB
Process terminated with status 0 (0 minute(s), 13 second(s))
0 error(s), 0 warning(s) (0 minute(s), 13 second(s))


build.cfg file contents
Code
WXVER_MAJOR=3 
WXVER_MINOR=0
WXVER_RELEASE=2
BUILD=release
MONOLITHIC=1
SHARED=1
UNICODE=1
TOOLKIT=MSW
TOOLKIT_VERSION=
WXUNIV=0
CFG=
VENDOR=cb
OFFICIAL_BUILD=0
DEBUG_FLAG=1
DEBUG_INFO=default
RUNTIME_LIBS=dynamic
MSLU=0
USE_EXCEPTIONS=1
USE_RTTI=1
USE_THREADS=1
USE_AUI=1
USE_GUI=1
USE_HTML=1
USE_MEDIA=1
USE_OPENGL=1
USE_QA=0
USE_PROPGRID=1
USE_RIBBON=1
USE_RICHTEXT=1
USE_STC=1
USE_WEBVIEW=1
USE_XRC=1
COMPILER=gcc
COMPILER_VERSION=
CC=gcc
CXX=g++
CFLAGS=
CPPFLAGS=
CXXFLAGS=-std=gnu++11 -fno-keep-inline-dllexport
LDFLAGS=

Tim S.
« Last Edit: December 10, 2014, 01:20:04 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline codeman_nz

  • Single posting newcomer
  • *
  • Posts: 5
Re: Please help with wxWidgets 3.0.2 and GNU compiler
« Reply #9 on: December 10, 2014, 01:45:17 am »
Aw man I am such an IDIOT.  I was using a different compiler to build wxwidgets.

Sorry for wasting everyone's time.