Note that it is better form to place extern "C" guards within
each header file, so it can be included from both C and C++
code without effort:

  -- contents of whatever.h --

  #ifdef __cplusplus
  extern "C" {
  #endif

  extern int my_func(float f);

  #ifdef __cplusplus
  }
  #endif

It is generally bad practice to try and use an #include within an
extern "C" {} block, as actual C++ code can get badly confused.

Naturally, if your headers are simple enough that this isn't an
issue, feel free to do whatever works.

- Kenneth

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eka
Gauranga Das
Sent: Tuesday, September 21, 2004 11:20 AM
To: Palm Developer Forum
Subject: Re: static library with C++ POL

try extern "C" 
{
#include <whatever.h>
}


On Tue, 21 Sep 2004 11:13:20 -0700, Jim Duffy <[EMAIL PROTECTED]>
wrote:
> 
> Does anyone know if it is possible to use a static library writen in C

> in a POL C++ project?
> 
> It works fine if I create a standard Code Warrior project but if I try

> in with a POL C++ project, I get 'function undefined' errors for the 
> public API's I'm trying to call in the library..
> 
> Thanks,
> 
> Jim

--
Chant Hare Krishna and Be Happy

Eka

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to