LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How does VC link a dll created by cygwin? (https://www.linuxquestions.org/questions/programming-9/how-does-vc-link-a-dll-created-by-cygwin-150210/)

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
chuanyung@pchome.com.tw

Thanks.

Regards,
cylin.

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.