Re: Does this work?
From: Brian Raiter (blr_at_drizzle.com)
Date: 08/30/05
- Next message: BM Sundar: "how to start new term at runtime"
- Previous message: Brian Raiter: "Re: Difference between variables and functions"
- In reply to: milkyway: "Does this work?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Aug 2005 23:43:27 +0000 (UTC)
> I then tried to compile test_query.c as follows:
>
> gcc -I/demo/ test_query test_query.o -L/demo/ -ltest.a
>
> I get the following error:
> /usr/bin/ld: cannot find -l/demo/test.a
If you're using the -l switch, then you need to leave off the .a:
gcc -I/demo/ test_query test_query.o -L/demo/ -ltest
Alternately, you can explicitly name the .a file on the commandline:
gcc -I/demo/ test_query test_query.o /demo/libtest.a
gcc will figure out from the file type that it's a static library and
do the right thing. Personally, I favor this syntax when linking with
static libraries that aren't installed by the system.
b
- Next message: BM Sundar: "how to start new term at runtime"
- Previous message: Brian Raiter: "Re: Difference between variables and functions"
- In reply to: milkyway: "Does this work?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|