Author Topic: C::B 10.05 MinGW on WinXP SP3 + Excel DLL  (Read 4473 times)

Offline fabietto0102

  • Single posting newcomer
  • *
  • Posts: 3
C::B 10.05 MinGW on WinXP SP3 + Excel DLL
« 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

Offline fabietto0102

  • Single posting newcomer
  • *
  • Posts: 3
Re: C::B 10.05 MinGW on WinXP SP3 + Excel DLL
« Reply #1 on: June 02, 2011, 01:18:18 pm »
Any idea please?  :(

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B 10.05 MinGW on WinXP SP3 + Excel DLL
« Reply #2 on: June 02, 2011, 02:04:45 pm »
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!]