help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linker (link archives)


From: Chien-Lung Wu
Subject: Linker (link archives)
Date: Thu, 11 Sep 2003 17:53:51 -0400

Hi, 
        I have following problem in writing makefile to link created
libraries. Could any one help me out? TIA.

        (I am working on WindowNT/Cygwin platform with a gnu PowerPC-elf
cross-compiler)
        I create/archive several libraries in:

        g:\proj\libs\lib-X.a
        g:\proj\libs\lib-Y.a

        I also create several c files:

        g:\proj\SRCS\sys\f1.c
        g:\proj\SRCS\sys\f2.c           These files will be compiled and
generate an obj file called f.o
        g:\proj\SRCS\sys\f3.c

        and 

        g:\proj\SRCS\apps\app1.c
        g:\proj\SRCS\apps\app2.c
        g:\proj\SRCS\apps\app3.c        These files will be compiled and
generate an obj file called app.o
        g:\proj\SRCS\apps\app4.c
        

        Now the finally obj is:

        finalobj: $(OBJS)
                ld-elf-ld       -o myfinalobj  f.o app.o \
                                -l g:/proj/libs/lib-X.a  \
                                -l g:/proj/libs/lib-Y.a \
                                -melfppc >myfinalobj.map

However, during the link stage, it show me that the linker can not find the
file g:/proj/libs/lib-X.a
and g:/proj/libs/lib-Y.a. I double check these two libraries; they are
there. So what is the problem 
with the linker/loader command? Are there any "syntax: errors?


David
        






reply via email to

[Prev in Thread] Current Thread [Next in Thread]