Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com X-Info: This message was accepted for relay by smtp03.mrf.mail.rcn.net as the sender used SMTP authentication X-Trace: UmFuZG9tSVaG/JB2Sjc6i8tM+e83F2j0s1s8dejC3fRbYpWZge6qiyTbzQPRdYW6 Message-ID: <3F295B51.2080005@cygwin.com> Date: Thu, 31 Jul 2003 14:09:21 -0400 From: Larry Hall Reply-To: cygwin@cygwin.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?J=E9r=F4me_DESPATIS?= CC: cygwin@cygwin.com Subject: Re: using a dll created by cygwin in msvc++ References: <20030731175944.43249.qmail@web11701.mail.yahoo.com> In-Reply-To: <20030731175944.43249.qmail@web11701.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 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 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/