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: using a dll created by cygwin in msvc++


Jérôme DESPATIS wrote:

i've created a .dll with cygwin

i'd like now to create a simple program under msvc++
that use functions of this dll

when i compile my very simple program, i get those
errors at link step: unresolved external symbol _foo
where foo is a function of my dll

so how can i use this dll in my program ? maybe a
foo.lib is missing (is there a way to create it from a
dll ?), or maybe is there another way to do so ?


You need an import library to link against, yes.  See
<http://cygwin.com/cygwin-ug-net/dll.html> for instructions
on building DLLs and import libraries with Cygwin.  Keep in
mind that if you're using cygwin1.dll in your resulting DLL
(i.e. you're not using the '-mno-cygwin' flag for gcc) then
you may end up with 2 C runtimes in your final executable.
See the FAQ and <http://cygwin.com/ml/cygwin/2003-07/msg01761.html>
for some information on this.  There's plenty more in the email
archives too if you're interested.


-- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.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]