This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DLL help needed...


>>>>> ">>" == Mikey  <jeffdbREMOVETHIS@netzone.com> writes:

    > [c:\projects\excel]exe
    > i 10.000000, j 11.000000, k -1.#IND00

    >> Could this help?
    >>  __attribute__((__stdcall__)) double RHS (double x, double y)
    > {
    > return (x + y);
    > }

Thanks for the suggestion. It makes some difference, but unfortunately
not to the output! 

With this change, I no longer need to compile with the -mrtd option,
and I need to change my dll.def file - using -mrtd I need

RHS
RHS@16=RHS

Using the explicit stdcall attribute in the .C file, and compiling
without -mrtd, the DEF file needs to be the other way round:

RHS@16
RHS=RHS@16

However, the program output is the same:

C:\PROJECTS\excel>exe
i 10.000000, j 11.000000, k -1.#IND00

Again, if I use exactly the same files, but replacing every "double"
with a "short", (and RHS@4 instead of RHS@16 where appropriate) the
program runs perfectly.

I just tried again, this time removing all stdcall references. The
program still fails, but this time I get

C:\PROJECTS\excel>exe
i 10.000000, j 11.000000, k 0.000000

(the last number is supposed to be the sum of the other two)

I'm still confused...

Richard Stanton
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]