"Chris DiPierro" <[EMAIL PROTECTED]> wrote in message
news:44196@palm-dev-forum...
>
> I now see that this is because I am using C++ ... if I write a C
library,
> it's fine, but not C++
>
> Is there a way to make a library in CW using C++ then, or am I SOL?

Well, you're pulling in __Startup__ because you don't have a __Startup__
function.  This is because C++ mangles names of functions to do typesafe
linking.  You have a line like

  #define SampleLibInstall  __Startup__

in your Prv header file.  This makes your install function the "startup"
function for the library by changing its name at compile time using a
macro.  However, since you're using C++, the name in the object file
actually looks like __Startup____FUsP18SysLibTblEntryType, which the
linker doesn't like.

The fix is very easy.  Modify where you declare and define your
SampleLibInstall to have

  extern "C"

prefixed in front of the declaration.  This will cause the compiler to
use an unmangled form, and the link will be successful.
--
Ben Combee, [EMAIL PROTECTED]
Techwood Broadcasting Foundation, Austin Bureau



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

Reply via email to