Re: linking C++ object files

Luc Hermitte <[email protected]> Mon, 29 Nov 2004 15:58:44 +0100
Newsgroups gmane.comp.tools.aap.user
Message-ID <20041129145844.GB2292@jade>
Hello,

* On Fri, Nov 26, 2004 at 11:43:37AM +0100, Bram Moolenaar <[email protected]> wrote:
> > However, if I only need to (re)link (because I forget a library in
> > the first place, or I decide to use another library), aap calls gcc
> > and not g++.
> > 
> This is a known problem that is only partly fixed.  When using build
> rules you can use the ">always" command block to add an attribute to
> the object file even when it's not build.  That doesn't work for
> actions though, and the gcc tool uses actions.
> 
> Simplest solution is to force the linker with:
> 	C_BUILD_ACTION = build_gxx

Thanks, I'll try this.

> > > > BTW, is there an AAP compiler-plugin for vim somewhere ?
> > [...]
> > but I was wondering if a more complete solution already exist.
> 
> It could be useful, I suppose.  If you can write a first version of an
> Aap compiler plugin I can include it with Vim.

I've started working on something. But it cannot be a plain aap
compiler-plugin.
The problem is we sometimes need to apply different filters on the
output of :make. For instance: a filter for aap (or (g)make, or bjam, or
scons, or ant, or ...), a filter for GCC (because the link errors are
not displayed), a filter for the test unit framework used, a filter for
cygwin, a filter for doxygen, ...

What is the real `current_compiler' ? It is quite impossible to tell.
With the cygwin compiler-plugin I'm maintaining, I've tried to answer
this question. But the answer is not very good, and not really
"scalable". Moreover, when we load a compiler-plugin that reset
current_compiler, we need to reload compiler/cygwin.vim. It is not very
handy.

Any way, I have a few more things to do on the alternative solution I'm
working on, and I'll make an announcement on Vim Mailing-list.


-- 
Luc Hermitte


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/