help-make
[Top][All Lists]
Advanced

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

Trouble linking through g++


From: Madhav Ancha
Subject: Trouble linking through g++
Date: Wed, 14 Oct 2009 23:24:29 -0500

Hi,

   When I run the linker through the command line like this, it works. 
      g++ -g -pg -fprofile-arcs -ftest-coverage -Lrelease1 -o testApp file.o -lSharedLib
   
   But when i run from a make file with the follow equivalent commands, it does not. It gives the error reproduced below. can you help debug the cause. 

     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.

Thanks,
Madhav Ancha.

   

reply via email to

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