| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <42C45145.4010202@familiehaase.de> |
| Date: | Thu, 30 Jun 2005 22:08:37 +0200 |
| From: | "Gerrit P. Haase" <gerrit AT familiehaase DOT de> |
| User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 |
| MIME-Version: | 1.0 |
| To: | cygwin <cygwin AT cygwin DOT com> |
| Subject: | undefined reference to `_CAPI_INSTALLED AT 0', why? |
| X-IsSubscribed: | yes |
Hello All,
I'm sure that this is covered somewhere, however I cannot find it
currently;)
Ok, I try to build a Cygwin application that requires CAPI functions
which are installed with the drivers for an ISDN card, the DLL is named
capi2032.dll, I have an import library which comes from the manufacturer
AVM but this contains symbols not included in the DLL or elsewhere.
In the .lib library are these symbols:
$ nm capi2032.lib | grep ' T '
00000000 T _CAPI_GET_MANUFACTURER AT 4
00000000 T _CAPI_GET_MESSAGE AT 8
00000000 T _CAPI_GET_PROFILE AT 8
00000000 T _CAPI_GET_SERIAL_NUMBER AT 4
00000000 T _CAPI_GET_VERSION AT 16
00000000 T _CAPI_INSTALLED AT 0
00000000 T _CAPI_MANUFACTURER AT 20
00000000 T _CAPI_PUT_MESSAGE AT 8
00000000 T _CAPI_REGISTER AT 20
00000000 T _CAPI_RELEASE AT 4
00000000 T _CAPI_WAIT_FOR_SIGNAL AT 4
00000000 T _TASK_REGISTER AT 12
00000000 T _TASK_RELEASE AT 4
in the import library I created are these symbols:
$ nm libcapi2032.dll.a | grep ' T '
00000000 T _TASK_RELEASE
00000000 T _TASK_REGISTER
00000000 T _CAPI_WAIT_FOR_SIGNAL
00000000 T _CAPI_SET_SIGNAL_FOR_16BIT
00000000 T _CAPI_RELEASE
00000000 T _CAPI_REGISTER
00000000 T _CAPI_PUT_MESSAGE
00000000 T _CAPI_MANUFACTURER
00000000 T _CAPI_INSTALLED
00000000 T _CAPI_GET_VERSION
00000000 T _CAPI_GET_SERIAL_NUMBER
00000000 T _CAPI_GET_PROFILE
00000000 T _CAPI_GET_MESSAGE_FOR_16BIT
00000000 T _CAPI_GET_MESSAGE
00000000 T _CAPI_GET_MANUFACTURER
Now linking against my import library gives me this errors:
Creating library file: .libs/libSimpleCapi.dll.a
.libs/capi20.o: In function `CAPI20_ISINSTALLED':
/p/ftproot/pub/asterisk/caiviar-0.3.5/src/capi20.c:68: undefined
reference to `_CAPI_INSTALLED AT 0'
[...]
Where does the @0 in capi20.o: _CAPI_INSTALLED AT 0 came from?
I see in the source:
extern DWORD APIENTRY CAPI_INSTALLED (void);
unsigned CAPI20_ISINSTALLED (void) {
#if defined(CYGWIN) || defined(WIN32)
return (unsigned)CAPI_INSTALLED () == 0;
#elif defined(LINUX)
return capi20_isinstalled() == CapiNoError;
#endif
So why does the compiler creats a reference to _CAPI_INSTALLED AT 0 or
is it the linker who wants to resolve CAPI_INSTALLED with @0 attached.
Sure, I could edit my .def file and create an import library that
contains the symbol names as expected by the linker, however I want
to know why this happens.
Is the docu around which explains it or can somebody who knows what
happens here tell me, please?
Gerrit
--
=^..^=
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |