This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: Using setupapi.lib/h/dll from cygwin
- To: "Larry Hall \(RFK Partners, Inc\)" <lhall at rfk dot com>, <cygwin at cygwin dot com>
- Subject: RE: Using setupapi.lib/h/dll from cygwin
- From: "Svein Erling Seldal" <Svein dot Seldal at edcom dot no>
- Date: Sun, 6 May 2001 00:56:01 +0200
> >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@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