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

Re: DLL calling a DLL: undefined reference when linking.


> That didn't seem to work.  I'm still confused as to why the
> --enable-stdcall-fixup flag doesn't appear to be working.
> 
> [...]
> >
> > Both the extern prototype and the function call are in dllhello.C.
> Thus
> it
> > does see the prototype.  As a further note and after further testing,
> if I
> > use implib on other.dll, I get the export list.  If I add an alias in
> the
> > .def file
> >
> > InitAPI at 4
> > InitAPI=InitAPI at 4
> >
> > then use dlltool to create the library, I can link against that
> library
> > successfully.
> >
> > So it seems clear that --enable-stdcall-fixup isn't working as
> advertised.
> >
> > Any idea why?
> >
> > Wil
> 
> What if you change the ordering, to say
> 
> extern "C" void PASCAL InitAPI( int handle );
> 
> ? Or use __stdcall instead of PASCAL ?


Mmmmm... You are including windef.h, right?


Regards,

Elfyn McBratney
elfyn at exposure dot org dot uk
www.exposure.org.uk


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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]