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:anyone have implicit linkage of gcc DLLs working in Visual C?


-----------------
Todd West wrote

I'm experimenting with using Cygwin and gcc -shared to build Windows DLLs
which are called by code compiled by VC6.0 SP5 or the Intel C 7.0 plug-in
for VC.  I've using some very small stubs of test code and DLLs extracted
from Atlas 3.4.1.  Implicitly linked calls go down fine at compile and link
time with .libs generated by gcc, but seg fault at run time.  Explicit DLL
linkage works fine (e.g. LoadLibrary() and GetProcAddress()); I can even
make successful calls across C++ ABIs.

<snip>


The import libs built with GCC tools are not completely compatible with
expectations of MS tools.

To workaround, create a .DEF file for your nifty new gcc-built dll and use it
to make a MS-style import lib.  I haven't done this for awhile, but IIRC the
command line is something like:

lib /DEF:foo.def /OUT foo.lib

Then use the foo.lib in your MSVC environemnt as you would any MS built *.lib
file.

Danny

http://movies.yahoo.com.au - Yahoo! Movies
- What's on at your local cinema?

--
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]