Re: {newbie question] dependencies on libraries

Bram Moolenaar <[email protected]> Fri, 06 Feb 2004 14:30:35 +0100
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Mathew Boorman wrote:

> I cannot figure out how to specify a dependency on a library.
> My current rules file looks like the following, by unfortunately
> libdog.so does not get built if I build go1.
> 
> What am I missing?
> 
> :dll dog : dog.cpp
> 
> :program go1 
> 	{var_LIBS= -ldog }
> 	{var_LDFLAGS= -L. }
> 	:
>  	go1.cpp dog

Adding a shared library to the sources of a program is not supported.
Should it work?

You can specify the dependency explicitly:

	:dll dog : dog.cpp
	:program go1 
		{var_LIBS= -ldog }
		{var_LDFLAGS= -L. }
		:
		go1.cpp
	go1 : dog

Since you use "-ldog" this is more logical than adding "dog" as a source
file.  Aap cannot know which "dog" library you want to link with (could
be a system library), thus I don't think this should be done
automatically.

-- 
Be thankful to be in a traffic jam, because it means you own a car.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn