News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

C::B 10.05 MinGW on WinXP SP3 + Excel DLL

Started by fabietto0102, May 31, 2011, 06:04:06 PM

Previous topic - Next topic

fabietto0102

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.next.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

fabietto0102


oBFusCATed

I guess it will be very hard to develop a DLL for Excel using Mingw.
Have you tried to use VC++ compiler?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]