The take up of Code:Blocks for building XLL's with XLW has been very good. Traditionally Visual Studio has dominated this area. But we are getting more and more questions and feedback from people using Code::Blocks.
Some users have experienced minor issues in getting a working installation of Code::Blocks with XLW & MinGW.
The problem has occurred when Code::Blocks has been installed with the default C++ compiler set to mingw32-gcc.exe and the default linker also set to mingw32-gcc.exe, i.e the C compiler and C linker when they should have been set to mingw32-g++.exe. User have then seen link errors complaining of undefined references to symbols that are part of the standard C++ library.
The problem can be replicated as follows :
1. write a simple "hello world" program, test.cpp that uses cout or
std::vector
2. Compile :- g++ -c test.cpp -o test.o
3. Link. :- gcc test.o -o test.exe
The above should give you the errors about undefined references to
symbols which you would expect to be in he standard C++ library
Now if you change step 3 to :
3. Link. :- g++ test.o -o test.exe
Then there should be no errors
I would assume that it is quite rare that Code::Blocks would incorrectly
set the C++ compiler and linker obviously here but it has happened.
Users of MinGW and Code::Blocks are advised to download and install in the order
(1) Download and install MinGW (v 4.4.0) with xlw MinGW Installer
http://sourceforge.net/projects/xlw/files/xlw-mingw-installer/MinGW%20_%20GCC4.4.0/xlw-MinGW-Installer.exe/download(2) Download and install the version of Code::Blocks
WITHOUT the MinGW compiler at
http://www.codeblocks.org/downloads/5(3) Download and install version 4.0.0. of XLW at
http://sourceforge.net/projects/xlw/files/xlw/xlw%204.0/xlw-4.0.0f0.exe/download(4) Furthermore :
Check under C++ compiler that mingw32-g++.exe is there (and not mingw32-gcc.exe),
Check under Linker for dynamic libs. that mingw32-g++.exe is there (and not mingw32-gcc.exe).
A Youtube video demonstrating this process can found here :
http://www.youtube.com/watch?v=PvQPEWKPB1w