[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble linking through g++
From: |
Greg Chicares |
Subject: |
Re: Trouble linking through g++ |
Date: |
Thu, 15 Oct 2009 14:33:18 +0000 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
On 2009-10-15 14:03Z, Madhav Ancha wrote:
>
> LINK_FLAGS= -g -pg -fprofile-arcs -ftest-coverage -fPIC -Lrelease1
> testApp: file.o -lSharedLib
> $(CXX) $(LINK_FLAGS) -o $@ $^
>
> Error:
> make: *** No rule to make target `-lSharedLib', needed by `testApp'.
> Stop.
'-lSharedLib' is a linker flag, but you've given it as a prerequisite.
Add it to your 'LINK_FLAGS' instead.
If you want the shared library to be a prerequisite, specify its actual
filename (e.g., 'libSharedLib.so'), and make sure your makefile contains
a rule to build it.