Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

lccwin32's import library function..

35 views
Skip to first unread message

copx

unread,
Apr 18, 2008, 12:12:27 AM4/18/08
to
I build DLLs using MS VC6 to shield tmy programs from the uglyness that is
Windows/C++ (DLL offers C interface to C++ Windows stuff like SAPI 5). I can
use these DLLs with mingw after importing the related import library.
However, it did not work with lccwin32 - unresolved references (compiler
cannot find any DLL functions). After a lot of head scratching I attempted
to actually use my DLLs with VC6 (instead of just using that compiler to
build them): same problem.
I eventually figured out that the problem could be fixed by specifing the
calling convention in the header file. I use the __stdcall convention for
the DLLs.
Now I wonder: why can mingw figure out the calling convention of the DLL
without any compiler specific dressing but VC6/lcc cannot?
Isn't the calling convention info stored in the lib? Do I need to turn on
some special switches to built MS import libs which work even without
specifying the calling convention in the header?
I ask because I want to use the same header for all compilers I use and
stuff like "__stdcall" breaks GCC (uses different syntax for specifying
calling conventions).


0 new messages