Re: New to aap: misc. problems
Bram Moolenaar <[email protected]> Tue, 06 Jul 2004 20:49:33 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Rainer Michael Schmid wrote:
> I use aap 1.065 on a Mac running Panther. Here are some problems I
> encountered:
>
> - Building a static library with :lib worked fine for a project with
> pure C files (ar is run and the library works fine). However, I am
> struggling to get the same thing work for a C++ project: when I first
> try to build it, the object files are compiled just fine. But when it
> comes to building the library it tries to do this with g++ and it
> fails. If I start aap again, no source files need to be compiled and it
> tries to build the library with ar and it succeeds. Haven't found a way
> to tell aap to do it right the first time.
Why does building with g++ fail? Or is it just the creation of the
static library that fails? On most system it's required to use a
different linker for C++. That "ar" is used when no compiling is done
is actually a small bug, fixed in a later version.
It appears there is a conflict between using a different build action
for making a program, and using a different build action for making a
static library. A simple solution would be to ignore "buildaction" when
making a library. This means that object files from C and C++ sources
are handled in the same way. If this needs to be different we could add
a "libaction" attribute to the object files.
> - I tried to build a C++ program and aap tried to link it with gcc
> instead of g++. I had to add a {var_LD=$CXX} option to the :program
> rule.
This should not happen if you compile and link in one go. As mentioned
above, there was a bug that this does happen when compiling first, then
running Aap again to do the linking. I believe this has been fixed now.
But I don't recall in which version...
> - The add_LIBS option passes the arguments (as it seems) directly. This
> in my case nice, since I need to specify not only "normal" libraries
> (with the -l flag), but also some frameworks to link against (done with
> the -framework flag). But I wonder why the design decision was to
> specify libraries via -l and not in an abstract manner.
This is just a convenient way to do it, especially for people that have
worked with make. The tool should translate -lxxx to whatever it uses
to link with library xxx. But this hasn't been implemented yet.
Adriaan is better at answering the Qt issues.
> All in all, I lost a bit the confidence in aap and I am wondering if
> I'm doing something wrong...
I use Aap every day for maintaining websites and checking files into
CVS. Compiling C files should also work fine.
The main problem is that Aap isn't used that much yet. The principles
work fine, but many of the details, especially in the tools, need to be
filled in. If you know how to do something, please suggest fixes.
--
A parent can be arrested if his child cannot hold back a burp during a church
service.
[real standing law in Nebraska, United States of America]
/// 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 ///
\\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com