User forums > Using Code::Blocks

Building Excel .xll addins with Code::Blocks & MingW

<< < (3/3)

Jenna:

--- Quote from: Ninds on July 20, 2009, 09:43:18 pm ---and set the Compilers installation directory to the bin directory of your new MinGW installation (if you used the xlw MinGW installer and installed to the default directory, this should be C:\GNU\MinGW\bin)

--- End quote ---

Don't use the bin-directory, use the directory, that contains the bin directory (as mentioned on the toolchain-tab) :


--- Quote from: Toolchains executables tab in compiler options dialog ---NOTE: All programs below, must exist either in the "bin" sub-directory of this path or in any of the "Additional paths"...
--- End quote ---

This should be (for the example above) C:\GNU\MinGW.

Ninds:
Thanks for the heads up.

Ninds:
The latest Beta can be downloaded from http://xlw.sourceforge.net/

Ninds:


XLW 4.0 has been released. It can be downloaded from http://xlw.sourceforge.net/.
Any feedback and suggestions for using XLW with Code::Blocks would be more than welcome at the xlw-users mailing list.

Ninds:
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



Navigation

[0] Message Index

[*] Previous page

Go to full version