Here is my situation: I learned to code using Borland compilers, but switched to Microsoft Visual Studio in college. Currently I've finished the last project I ever want to do in Visual Studio 6. The new project that an undergrad and I will be working on is going to be coded using wxWidgets.
I have been able to compile the libraries for wxWidgets using VC6 and mingw. We have had success getting VC6 to compile some wx projects. However, using VC6 for wxWidgets makes little sense as it is about as useful to me as VI and a command line compiler.
The dilema: getting C::B and wxWidgets to play nice on these win2kpro machines. Thus far we've each spend about 10 hours trying to get this correct. The last thing we've tried has been to remove C::B, wxwidgets, and minGW and starting from scratch.
Here's what we've done:
mingw installed, wxwidgets unpacked, wxwidgets compiled as per this wiki set up guide(
http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide), installed C::B, and opened a wxwindows project.
I am unsure how much of the project setting or makefile would be useful in this post, but here are some of the project settings:
Project>Build Options>Other Options:
-pipe
-mthreads
-Winvalid-pch
-include "wx_pch.h"
-c
-fno-rtti
-fno-exceptions
-fno-pcc-struct-return
-fstrict-aliasing
-Wno-ctor-dtor-privacy
Project>Build Options>Defines:
HAVE_W32API_H
__WXMSW__
__GNUWIN32__
__WIN95__
WXUSINGDLL
Project>Build Options>Directories>Compiler
$(WX_DIR)\include
$(WX_DIR)\lib\gcc_lib$(WX_CFG)\msw
$(WX_DIR)\contrib\include
Project>Build Options>Directories>Linker
$(WX_DIR)\lib\gcc_lib($WX_CFG)
C:\wxWidgets-2.6.3\lib\gcc_dll
Project>Build Options>Directories>Resource compiler
$(WX_DIR)\include
Project>Build Options>Custom variables
WX_DIR=C:\wxWidgets-2.6.3
WX_CFG=
Now, here is the Build Log we recieve when trying to compile the project:Compiler : GNU GCC Compiler (called directly)
Directory : G:\wxCodeBlocksProjs\testProj1\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: G:\wxCodeBlocksProjs\testProj1\wxWidgets.exe
.objs\main.o:main.cpp:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x27): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\main.o:main.cpp:(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2c): undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\main.o:main.cpp:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x68): undefined reference to `wxApp::Initialize(int&, char**)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
So at this point, we're not exactly sure where to go. It looks like we're not linking a library that we need to, but we have the following libraries linked (Project Options>Linker>Link libraries:) wxmsw26u, winspool, winmm, shell32, comctl32, ct3d32, odbc32, advapi32, wsock32, opengl32, glu32, ole32, oleaut32, uuid, wxzlib, wxregexu, wxexpat. I was under the impression that those were the required libraries and then some.
We've decided that these errors are likely due to some small option or method we have overlooked. If we ever do figure out what the problem is it will likely make us feel a bit embarassed in that "oh duh!" sort of way.
Any insight will be greatly appreciated.
Thank you in advance,
Colin & Chris