I haven't tried this with PODS, but it should work
the same as on any Linux or Unix system.  Try this:

-lGrabba

The way it's done with Unix cc is to put the linker
options after all the compiler options, and to include
a library, you specify -l followed immediately by the
name of the library, without the 'lib' prefix.  For
example, to link to the math library (libm.a), you'd say

cc src.c -lm

Another thing: make is not running from your source code "src"
directory.  As you can see in the gcc command, it's referring
to AppMain.o as "src/AppMain.o".

IIRC, if you are building a Release version, make runs
using the directory named "Release" as its working directory,
and for a Debug build, it runs in "Debug".  The object files
end up in Release/src or Debug/src, respectively.  There
is also a "rsc" directory there, which may be confusing things
a bit.

Try specifying the directory named in the -L option by an
absolute path spec.  Or change the relative path spec to
get to the correct directory.

Another thing you might be doing wrong is putting your library
in the rsc directory rather than the src directory, along with
your source code.  (I don't see why you put it in the rsc directory;
that's for resources handled by the Resource Editor.)

In fact, if you put your .a library file in the "src" directory
along with your source code and do a Refresh in PODS (leftside
"Navigation" pane, right click on project name, select Refresh),
PODS may even include it for you in the Managed Make automatically.
Try it.

Jay Ts

--------------------------------
On Sat, Mar 25, 2006 at 08:55:46PM -0000, Joel Henderson wrote:
> Hello,
> 
> I'm new to the Palm OS Development Suite (and Palm development for that 
> matter) so please bear with me.
> 
> My questions is how can I link a static library to a project? I have the 
> static library libGrabba.a and it's in the Debug/rsc folder of my Managed 
> Make C/C++ project. I read that I am suppose to add them to the PRC-Tools 68k 
> linker, but I cannot seem to get the connection strings right.
> 
> Here's what I'm inputting into the 68k linker:
> 
> -L ../rsc/libGrabba
> -l libGrabba
> 
> 
> Here's the error I get from the console:
> 
> m68k-palmos-gcc: libGrabba: No such file or directory
> 
> m68k-palmos-gcc -g -o test src/AppMain.o        -L../../rsc/libGrabba -l 
> libGrabba
> make: *** [test] Error 1
> Build complete for project test
> 
> 
> 
> I'm obviously not inputting something right.

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

Reply via email to