help-gplusplus
[Top][All Lists]
Advanced

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

Re: gmake error: No rule to make target lib_file.a


From: Dave Seaman
Subject: Re: gmake error: No rule to make target lib_file.a
Date: Wed, 7 May 2008 15:03:56 +0000 (UTC)
User-agent: slrn/0.9.8.1 (Darwin)

On Wed, 7 May 2008 05:53:45 -0700 (PDT), D3|\||\|!$ wrote:

> I supplied the libraryname along with the path as "dir_pathname/
> libfilename1.a dir_pathname/libfilename2.a.." in the make options.
> Gmake shows success but does not create the corresponding .o and
> binary files.

A library is an archive.  Did you provide any dependencies involving
members of the archive?  You may want to look at:

        <http://www.gnu.org/software/make/manual/make.html#Archives>

> When I hit execute, it throws up a terminal window saying "./
> project_dir does not exist".

What does it mean to "hit execute"?  I thought you were using "make".
What happens if you execute the program in the same terminal window that
you were using to run make?  What is your current working directory?
Does project_dir actually exist, and is it a subdirectory of your current
working directory, as the command expects?

> Another thing: though gmake shows success, it gives the following
> message for all the included libraries - "Nothing to do for
> libfilename.a"

That means that all the library members you specified as dependencies in
your Makefile for the given target are already up to date.  Note that
this is vacuously true if you failed to provide any such dependencies.
See the URL above to find out how to do this.  The short description is
that you can use "libfoo.a(bar.o)" in a dependency rule to specify a
library member to be updated.  You can use "ar t <library-file>" to see
what members, if any, the library already has.  If the ones you need are
not there, then you need some more rules in your Makefile to create them.

> Also, if I remove all the linker flags and stuff, gmake still shows
> the same success message... Is that OK??

If you expected something to be created and it wasn't, then something is
missing in your make rules.

-- 
Dave Seaman
Third Circuit ignores precedent in Mumia Abu-Jamal ruling.
<http://www.indybay.org/newsitems/2008/03/29/18489281.php>


reply via email to

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