In a shared library's main header file, its exposed functions should be
'extern'd, and the should resolve into SYS_TRAP calls, which the linker
should then resolve without a hitch.  Here's an example of one that works:

extern Err SampleLibClose(UInt refNum, DWord clientContext)
                                SAMPLE_LIB_TRAP(sysLibTrapClose);

Are you sure this isn't a static library?  Those are meant to be linked into
your project at compile time instead of runtime.  If it is a static library,
you just need to add MyLibrary.lib to your Codewarrior project.  Then the
linker will know to resolve the function calls into the static library
trough this .lib file.  

Shared libraries don't usually have corresponding .lib files, so that would
be one clue that you're working with a Static library instead of a shared
library.

If you want the lowdown, please check out my article:
http://www.wwg.com/newsview/shared.shtml

Thanks,
-Jeff Ishaq
The Windward Group



-----Original Message-----
From: Ariel Barreiro [mailto:   
Sent: Tuesday, September 21, 1999 4:11 PM
To: Palm Forum List
Subject: Shared Libraries with CW


Hey, I have trying to use a Shared Library but when I call for the lib
functions I receive a link error telling me that the function is undefined.
I do include the header file but it still to tell me that those functions
are undefined. If somebody can help me with this becouse I am completly
blocked.

Thank you.


Reply via email to