I'm trying to compile Code::Blocks 1.0-beta5, using the project file in the archive.
The compiler is g++ 3.4.2 (mingw-special), the IDE is beta 5 itself.
This is the output: (the part that went wrong)
Project : Code::Blocks
Compiler : GNU GCC Compiler (called directly)
Directory : D:\C++\cvs\CodeBlocks-1.0-beta5\
--------------------------------------------------------------------------------
Linking dynamic library: devel\codeblocks.dll
Creating library file: devel\\libcodeblocks.a
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilersC2EP8wxWindow':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:17: undefined reference to `wxXmlResource::Get()'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:17: undefined reference to `wxXmlResource::LoadDialog(wxDialog*, wxWindow*, wxString const&)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:19: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:19: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:22: undefined reference to `_imp___ZN10wxListCtrl8ClearAllEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:23: undefined reference to `_imp___ZN10wxListCtrl12InsertColumnElRK8wxStringii'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:24: undefined reference to `_imp___ZN10wxListCtrl12InsertColumnElRK8wxStringii'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:29: undefined reference to `_imp___ZNK10wxListCtrl12GetItemCountEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:29: undefined reference to `_imp___ZN10wxListCtrl10InsertItemElRK8wxString'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:31: undefined reference to `_imp___ZNK10wxListCtrl12GetItemCountEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:33: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:39: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:42: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `_imp___ZN8wxDialogD2Ev'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilersC1EP8wxWindow':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:17: undefined reference to `wxXmlResource::Get()'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:17: undefined reference to `wxXmlResource::LoadDialog(wxDialog*, wxWindow*, wxString const&)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:19: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:19: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:22: undefined reference to `_imp___ZN10wxListCtrl8ClearAllEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:23: undefined reference to `_imp___ZN10wxListCtrl12InsertColumnElRK8wxStringii'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:24: undefined reference to `_imp___ZN10wxListCtrl12InsertColumnElRK8wxStringii'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:29: undefined reference to `_imp___ZNK10wxListCtrl12GetItemCountEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:29: undefined reference to `_imp___ZN10wxListCtrl10InsertItemElRK8wxString'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:31: undefined reference to `_imp___ZNK10wxListCtrl12GetItemCountEv'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:33: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:39: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:42: undefined reference to `_imp___ZN10wxListCtrl7SetItemEliRK8wxStringi'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:49: undefined reference to `_imp___ZN8wxDialogD2Ev'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilersD2Ev':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:53: undefined reference to `_imp___ZN8wxDialogD2Ev'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilersD1Ev':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:53: undefined reference to `_imp___ZN8wxDialogD2Ev'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilersD0Ev':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:53: undefined reference to `_imp___ZN8wxDialogD2Ev'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilers14OnDefaultClickER14wxCommandEvent':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:59: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:59: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:60: undefined reference to `_imp___ZNK10wxListCtrl11GetNextItemElii'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:64: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:64: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
sdk\\.objs\\autodetectcompilers.o: In function `ZN19AutoDetectCompilers10OnUpdateUIER15wxUpdateUIEvent':
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:70: undefined reference to `wxXmlResource::GetXRCID(char const*)'
D:/C++/cvs/CodeBlocks-1.0-beta5/sdk//autodetectcompilers.cpp:70: undefined reference to `_imp___ZN12wxWindowBase10FindWindowEl'
Process terminated with status 1 (0 minutes, 59 seconds)
42 errors, 0 warnings
Any ideas? Did I maybe do something wrong installing wxWidgets?
CB needs from wxWidgets the following: wxmsw242.dll, libwxmsw242.a, libwxxrc.a and libwxstc.a (xrc and stc are static libs).
Check that they exist, especially libwxxrc.a (based on the errors above). These are for wxWidgets 2.4.2. It works with 2.4.1 and 2.5.x (IIRC), as long as these files exist.
I have all of those, except libwxstc.a. I do, however, have libstc.a (which should be the right name looking at the project file and the linker command line).
Actually, libwxxrc.a is also where I suspect the problem might be. I have it, but "grep LoadDialog libwxxrc.a" (see second error message) doesn't turn up anything, though it is in the source. Just to be sure, I'm recompiling it right now.
If you are not using wxWidgets 2.4.2, go to "Settings/Configure plugins/Compiler", switch to the "Custom variables" tab and add/edit a variable named WX_VER containing the wxWidgets version you 're using (e.g. 241 for wx2.4.1, 242 for wx2.4.2, etc)
Now that I think of it, the variable WX_VER might be the problem. These custom variables, unfortunately, are not saved with the project file but are global options. I must change that...
Actually, I noticed that, and I added a custom variable WX_VER set to 242 (my wxWidgets version). And yes, you should change that. :)
If you still can't find what's going on, go to "Settings/Configure plugins/Compiler", switch to the "Other" tab and set the GCC logging to full. Compile CB and when it stops with the error, post the compile log. I want to see the linker command line (although, if you 're using the supplied project file, it should be fine)...
mingw32-g++.exe -shared -Wl,--output-def="devel\\libcodeblocks.def" -Wl,--out-implib="devel\\libcodeblocks.a" -Wl,--dll -L"D:\\C++\\MinGW\\lib" -L"D:\\C++\\local\\lib" -L"sdk/tinyxml" "sdk\\Managers\\.objs\\Managers.o" "sdk\\Managers\\.objs\\StdAfx.o" "sdk\\.objs\\autodetectcompilers.o" "sdk\\.objs\\cbeditor.o" "sdk\\.objs\\cbplugin.o" "sdk\\.objs\\cbproject.o" "sdk\\.objs\\compileoptionsbase.o" "sdk\\.objs\\compiler.o" "sdk\\.objs\\compilerfactory.o" "sdk\\.objs\\compileroptions.o" "sdk\\.objs\\compiletargetbase.o" "sdk\\.objs\\configmanager.o" "sdk\\.objs\\configuretoolsdlg.o" "sdk\\.objs\\confirmreplacedlg.o" "sdk\\.objs\\devcpploader.o" "sdk\\.objs\\editarrayfiledlg.o" "sdk\\.objs\\editarrayorderdlg.o" "sdk\\.objs\\editarraystringdlg.o" "sdk\\.objs\\editorcolorset.o" "sdk\\.objs\\editorconfigurationdlg.o" "sdk\\.objs\\editormanager.o" "sdk\\.objs\\edittooldlg.o" "sdk\\.objs\\filegroupsandmasks.o" "sdk\\.objs\\finddlg.o" "sdk\\.objs\\globals.o" "sdk\\.objs\\incrementalselectlistdlg.o" "sdk\\.objs\\macrosmanager.o" "sdk\\.objs\\manager.o" "sdk\\.objs\\menuitemsmanager.o" "sdk\\.objs\\messagelog.o" "sdk\\.objs\\messagemanager.o" "sdk\\.objs\\msvc7loader.o" "sdk\\.objs\\msvcloader.o" "sdk\\.objs\\newfromtemplatedlg.o" "sdk\\.objs\\pipedprocess.o" "sdk\\.objs\\pluginmanager.o" "sdk\\.objs\\pluginsconfigurationdlg.o" "sdk\\.objs\\projectbuildtarget.o" "sdk\\.objs\\projectfileoptionsdlg.o" "sdk\\.objs\\projectlayoutloader.o" "sdk\\.objs\\projectloader.o" "sdk\\.objs\\projectmanager.o" "sdk\\.objs\\projectoptionsdlg.o" "sdk\\.objs\\projectsfilemasksdlg.o" "sdk\\.objs\\projecttemplateloader.o" "sdk\\.objs\\replacedlg.o" "sdk\\.objs\\sdk_events.o" "sdk\\.objs\\selecttargetdlg.o" "sdk\\.objs\\simplelistlog.o" "sdk\\.objs\\simpletextlog.o" "sdk\\.objs\\templatemanager.o" "sdk\\.objs\\toolsmanager.o" "sdk\\.objs\\workspaceloader.o" -L"D:\\C++\\MinGW\\lib" -L"D:\\C++\\local\\lib" -L"sdk/tinyxml" -o "devel\\codeblocks.dll" -Wl,--enable-auto-image-base -Wl,--export-all-symbols -Wl,--add-stdcall-alias -ltxml -lwxxrc -lstc -lwxmsw$(WX_VER)
followed by the errors in my first post.
Oh, and you didn't answer my question where the dll should be. (I put all the .a files I got from compiling wxWidgets in D:\C++\local\lib, which is in the library path of the linker, so that shouldn't be a problem)