help-make
[Top][All Lists]
Advanced

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

Re: Trouble linking through g++


From: Madhav Ancha
Subject: Re: Trouble linking through g++
Date: Thu, 15 Oct 2009 09:38:24 -0500

Thanks Greg. That helped.

-Madhav.

On Thu, Oct 15, 2009 at 9:33 AM, Greg Chicares <address@hidden> wrote:
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.


reply via email to

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