LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-25-2004, 12:31 AM   #1
chuanyung
LQ Newbie
 
Registered: Jan 2004
Posts: 25

Rep: Reputation: 15
Question 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.
 
Old 02-25-2004, 01:06 PM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
windows DLL edselrt Linux - Newbie 2 11-07-2005 09:02 PM
cygexpat-0.dll problems in cygwin aneeshm Linux - General 1 05-13-2005 09:03 AM
Error: "A required .DLL file, CYGPCRE -0.DLL, was not found" when using man dipperdan Linux - Newbie 2 04-28-2004 04:55 PM
Link DLL with C code on Win32 (CygWin) jpbarto Programming 4 10-23-2003 03:30 PM
hal.dll XPediTioN Slackware 3 09-16-2003 01:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration