User forums > Help
wxWidgets Hello World! fails to build
Frank_CB:
@PB:
i had compiled your tutorial's sample a few times accounting for multiple occurrences of wxUSE_DPI... i deleted that sample and started over. Your tutorial's sample was for 32-bit machines. I made a couple of modifications to make that sample compile on a 64-bitplatform. I obvious didn't change the link command correctly. Also your tutorial said to set a particular compiler flag, but the available compiler flags weren't available. The new build log follows:
--- Code: ----------------- Build: Debug in Test (compiler: GNU GCC 13.1.0 Mingw64 Compiler)---------------
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DwxUSE_DPI_AWARE_MANIFEST=2 -D__WXDEBUG__ -IC:\wxWidgets-3.2.2.1\include -IC:\wxWidgets-3.2.2.1\lib\gcc_dll64\mswud -c C:\Sandbox1\Test\TestApp.cpp -o obj\Debug\TestApp.o
g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DwxUSE_DPI_AWARE_MANIFEST=2 -D__WXDEBUG__ -IC:\wxWidgets-3.2.2.1\include -IC:\wxWidgets-3.2.2.1\lib\gcc_dll64\mswud -c C:\Sandbox1\Test\TestMain.cpp -o obj\Debug\TestMain.o
g++.exe -LC:\wxWidgets-3.2.2.1\lib\gcc_dll -o bin\Debug\Test.exe obj\Debug\TestApp.o obj\Debug\TestMain.o obj\Debug\resource.res -mthreads -lwxmsw32ud_core -lwxbase32ud -mwindows
C:/Mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxmsw32ud_core: No such file or directory
C:/Mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lwxbase32ud: No such file or directory
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 18 second(s))
3 error(s), 0 warning(s) (0 minute(s), 18 second(s))
--- End code ---
Is what I missed apparent?
PB:
--- Quote from: Frank_CB on July 24, 2023, 06:04:46 pm ---i had compiled your tutorial's sample a few times accounting for multiple occurrences of wxUSE_DPI... i deleted that sample and started over.
--- End quote ---
The number of compilations has no effect on the number of occurrences of a define. Still, the point was this define belongs to the resource compiler, not the C++ compiler, as is clearly explained in the guide.
--- Quote from: Frank_CB on July 24, 2023, 06:04:46 pm ---Your tutorial's sample was for 32-bit machines. I made a couple of modifications to make that sample compile on a 64-bitplatform. I obvious didn't change the link command correctly. Also your tutorial said to set a particular compiler flag, but the available compiler flags weren't available.
--- End quote ---
My guide is for the 64-bit compiler (are we even talking about the same document?), moreover, the bitness does not matter at all here and everything works out of the box irregardless. I also do not see how it would be possible for the available compiler flags to be unavailable?
Looking at the build output, it is pretty obvious you are still mixing library folders and did not follow the guide, letting the wizard set everything for you.
Unfortunately, it seems that my guide is not a good match for you and you need to use another, better, resource. Sorry for leading you the wrong way and good luck in the future!
Frank_CB:
@PB:
I apologize for wasting your time in you trying to explain to an [old] newbie how your tutorial builds the correct sample right out of the box. I'll read your tutorial completely, but there will be no more correspondence about this subject.
Thanks again for your efforts in trying to explain to an [old] newbie how wxWidgets projects can be built.
Frank_CB
Navigation
[0] Message Index
[*] Previous page
Go to full version