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: D3|\||\|!$
Subject: Re: gmake error: No rule to make target lib_file.a
Date: Thu, 8 May 2008 05:18:03 -0700 (PDT)
User-agent: G2/1.0


Dave Seaman wrote:
> 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.

Sorry but I am not very clear about the dependency thing you are
talking about - I'm more used to being a "Windows-GUI Kiddie" and
mentioning the libraries used by the application source into some kind
of space and leaving the rest to the IDE... Any help will be really
appreciated!! Where exactly am I expected to provide such a
dependency?

> 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.

Well!! When one "builds" a project, one does expect to find the .o
files of the .cpps and the binary of the .cpp file containing the
main() function. This is not there... I have already uploade d the
makefile but the solution you suggested ealier doesn't seem to fit
into the solution.. :-(


reply via email to

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