Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: fabietto0102 on May 31, 2011, 06:04:06 pm
-
Hello,
I installed C::B 10.05 with the GCC compiler and GDB debugger from MinGW on a WinXP SP3 machine. My intention is to build an Excel DLL using C::B instead of MS Visual Studio.
I run through the project wizard, I selected DLL and I compiled the given example someFunction (without any code of mine). Unfortunately, I get #VALUE! in Excel. I followed the instruction here http://forums.codeblocks.org/index.php/topic,7041.0.html , but no luck, besides, they are 4 years old.
I was able to use a very simple DLL written and compiled with VisualStudio, but can't get it to work with C::B
main.cpp:
double __stdcall Csquare(double &arg){return (arg*arg);}
main.def:
LIBRARY FabVB
EXPORTS
Csquare
Any help available, please? I struggle doing the linking, even though I added -Wl,--add-stdcall-alias to the Other linker option. I tried to run the dependencywalker but nothing seems wrong to me.
Also, the Csquare method could be a good example to keep in the wiki for C::B newbee like me or as a project example for future releases of C::B.
Thank you
Fabio
-
Any idea please? :(
-
I guess it will be very hard to develop a DLL for Excel using Mingw.
Have you tried to use VC++ compiler?