This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: dll link error using Cygwin gcc


As Dave Korn and Brian Dessent both pointed out, my problem was that gcc was
compiling Hello.c with the default cdecl calling convention, but the library
I wanted to link to uses the stdcall convention. Adding __stdcall to the
function declarations in the header file eci.h fixed the problem. Dave
suggested using the --enable-stdcall-fixup link option, which from the ld
documentation did seem like it would do the trick, but I couldn't get it to
work. I specified it to gcc as -Wl,--enable-stdcall-fixup, but still got the
"undefined reference" error message.

Cheers,

    Harold Mills



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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