Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Svein Erling Seldal" To: "Larry Hall \(RFK Partners, Inc\)" , Subject: RE: Using setupapi.lib/h/dll from cygwin Date: Sun, 6 May 2001 00:56:01 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <4.3.1.2.20010504113950.01fbdb28@pop.ma.ultranet.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 > >Hi, > > > >I'm building a GNU program which is dependent on functions from the MS > >library 'setupapi.lib' (which in turn loads 'setupapi.dll'). > This library is > >not included in the w32api package. > > > >How do I proceed to get this included into my program? I've successfully > >compiled the program (using MS headers), but complete linking remains. It > >misses and requires four functions which is exported in setupapi.dll. > > > >How do I include a custom dll into my program, like this? > > > > > >Regard, > >Svein Erling Seldal > > > > Add setupapi.lib to your link line. Well, how is this done? If I use: 'gcc -o foo foo.o' Returns: foo.o(.text+0x1b):foo.c: undefined reference to `_imp__SetupDiGetClassDevsA AT 16' If I use: 'gcc -o foo foo.o setupapi.lib' Returns the same If I use: 'gcc -o foo foo.o -L. -lsetupapi.lib' Returns unknown library 'setupapi.lib' If I rename setupapi.lib to libsetupapi.a and run 'gcc -o foo -L. -lsetupapi' Returns unknown library. This is all caused (I think) by the missing symbols, which are found in the public setupapi.dll file. And my question boils down to this: How do I include a dll file like this into my application from GNU tools? Regards, Svein Erling Seldal -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple