I just tried this with an old static lib we had here and it seems to
work fine.  Perhaps you are just getting bit by C++ name mangling?

If you look at all the system header files you will see that most of
them have something like the following around function declarations:

#ifdef __cplusplus
extern "C" {
#endif

<function declarations>

#ifdef __cplusplus
}
#endif

This tells the C++ compiler not to 'mangle' these names.  Mangling is
how C++ does better type checking and function overloading - it actually
encrypts extra info into the name.

If the header you are using for the .lib does not override this, you are
trying to link to a mangled name, which does not exist in the lib.

Hope that helps.

Best Regards,
-jjf

-----Original Message-----
From: Dave Lippincott [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 01, 2000 6:04 AM
To: Palm Developer Forum
Subject: Using compilited C libs with C++


Is there a way get a static library originally compiled for C using
Codewarrior to link with in a project with the C++ options turned on.  I
don't have access to the source code to compile it myself and the author
doesn't seem to be responding to any email.  I'm using CW6 on Windows 98


Thanx
D



-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to