[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DLL version of Gnokii for Win32
From: |
Feico de Boer |
Subject: |
Re: DLL version of Gnokii for Win32 |
Date: |
Thu, 11 Apr 2002 09:29:43 +0200 |
Oops, typo, in file b.c I meant 'extern int etc...'. Apart from this, in
case of C++ compilation it should be considered to use another linkage
specifier to avoid C++ name mangling. This linkage specifier is 'extern "C"'
and is accepted by all C++ compilers AFAIK.
This is especially needed when a programmer wants to use the C-style Gnokii
API in a C++ application. As such this will mean an adaption for the (API)
includes only. To be honest, I only bring this up as an C++ issue, I don't
know how this is best implemented.
Regards,
Feico.
----- Original Message -----
From: "Feico de Boer" <address@hidden>
To: <address@hidden>
Sent: Wednesday, April 10, 2002 10:23 PM
Subject: Re: DLL version of Gnokii for Win32
> I think it just specifies extern linkage. In other words, sybols defined
as
> 'extern' are visible outside the module in which they are defined.
>
> Example:
>
> file h.h:
> extern int externfunc(void);
>
> file a.c:
> #include "h.h"
>
> main()
> {
> externfunc();
> }
>
> file b.c:
> #include "h.h"
>
> int externfunc(void)
> {
> return(0);
> }
>
> Now it does appear extern linkage is standard but IMHO it does not seem to
> hurd. I couldn't find exact definitions for 'extern' however.
>
> ----- Original Message -----
> From: "Pawel Kot" <address@hidden>
> To: <address@hidden>
> Sent: Wednesday, April 10, 2002 2:38 PM
> Subject: Re: DLL version of Gnokii for Win32
>
> > #else /* !WIN32 */
> > # define GNOKIIDLL_API extern
> > #endif /* WIN32 */
>
> Ouch. I just noticed that you use this macro not in the declaration,
> but in definition. I don't have ANSI C speficifation with me, but
> what's the result of the extern in the function definition? I have
> never used such construction.
- Re: DLL version of Gnokii for Win32, (continued)
- Re: DLL version of Gnokii for Win32, Pavel Machek, 2002/04/15
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/15
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/19
- Re: DLL version of Gnokii for Win32, Feico de Boer, 2002/04/26
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/27
- Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/28
- Re: DLL version of Gnokii for Win32, Gnokii for Win32, 2002/04/29
- Message not available
- Re: DLL version of Gnokii for Win32, Pavel Machek, 2002/04/21
Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/10
Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/10
Re: DLL version of Gnokii for Win32, Pawel Kot, 2002/04/11