-   Programming (
-   -   How does VC link a dll created by cygwin? (

chuanyung 02-25-2004 12:31 AM

How does VC link a dll created by cygwin?
Dear all,

I use g++ to create a dll in cygwin.
But I want to use VC to compile, link with this dll.
So I need to have a .lib file.
I have done it through cygwin user's guide.
But VC seems not to know this lib file.

How should I do write a header file, and create a lib file exactly?
Then they can add in the VC project.

Does anyone ever do that?
If you are free, please send me a simplest sample to



deiussum 02-25-2004 01:06 PM

I don't think .lib files have any standard format, so you would need a .lib file specifically for VC++.

Another option is to dynamically load the DLL and functions with LoadLibrary and GetProcAddress. This is a bit more work than just using .h and .lib files, though...

All times are GMT -5. The time now is 05:08 PM.