delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/07/05:46:52

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Svein Erling Seldal" <Svein DOT Seldal AT edcom DOT no>
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
Date: Mon, 7 May 2001 11:42:50 +0200
Message-ID: <NEBBLKFNEDOFBCDCJMLKIEJGCDAA.Svein.Seldal@edcom.no>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
In-Reply-To: <4.3.1.2.20010506230349.020e0ef8@pop.ma.ultranet.com>
Importance: Normal

> From: Larry Hall (RFK Partners, Inc) [mailto:lhall AT rfk DOT com]
>
> At 06:56 PM 5/5/2001, Svein Erling Seldal wrote:
> >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
>
>
> OK, what does the symbol in setupapi.lib look like?  What you did should
> work if the symbol is in the library and matches the reference exactly.

OK. I get your point:

My app requires "SetupDiGetClassDevs()". When compiled, it generates a
reference to "SetupDiGetClassDevsA AT 16" *or* "_imp__SetupDiGetClassDevsA AT 16"
(depending on wheter og not I edit the original MS setupapi.h file, where I
remove the #define WINSETUPAPI DECLSPEC_IMPORT setting or not).

Now, the MS provided setupapi.lib, however, defines these symbols as:
"_SetupDiGetClassDevsA" and its imported reference as
"__imp__SetupDiGetClassDevsA". That's why it isnt working.

So the fix to this problem is either: 1) I need to generate a libsetupapi.a
which uses the GNU naming method somehow. Or 2) tell the GNU compiler not to
use the '@16' postfix-scheme on this specific library/dll. Correct?


Regards,
Svein Erling Seldal


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019