[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking in C++ mode
From: |
John Levon |
Subject: |
Re: Linking in C++ mode |
Date: |
Mon, 11 Nov 2002 00:35:56 +0000 |
User-agent: |
Mutt/1.3.25i |
On Sun, Nov 10, 2002 at 06:50:47PM -0500, Earnie Boyd wrote:
> >I do not think getting gcc to link -lstdc++ is a good idea either, but
> >it doesn't have much more hack value than the solution you propose below
> >IMHO.
>
> It's the hack that using g++ performs.
I do not believe there is any guarantee that using gcc to link will get
the C++ linking case correct. Now, I know this works, but the previous
sentence gives the reason I call it a hack.
> Well, g++ does the same extension filtering that gcc does. It will
> compile .c as C and .C, .cc, .cxx, .cpp as C++. If either finds source
> in the form of the other then the compilation type is changed.
However, gcc/g++ gets this right, and allows you to override its
guessing, via the -x flag. It seems automake does not.
> Another solution would be to use a BUILD_CC variable. Set BUILD_CC to
> the value of $(CC) for C and the value of $(CXX) for C++ and use
> $(BUILD_CC) in the rules.
How would this look in a Makefile.am ? Would I have to throw away
auto-deps for this to work ?
regards
john
--
"History is the slaughter-bench at which the happiness of peoples, the
wisdom of states and the virtue of individuals have been sacrificed."
- Hegel
- Linking in C++ mode, John Levon, 2002/11/09
- Re: Linking in C++ mode, Earnie Boyd, 2002/11/10
- Re: Linking in C++ mode, Ralf Corsepius, 2002/11/10
- Re: Linking in C++ mode, John Levon, 2002/11/10
- Re: Linking in C++ mode, Pierre Sarrazin, 2002/11/10
- Re: Linking in C++ mode, John Levon, 2002/11/10
- Re: Linking in C++ mode, Pierre Sarrazin, 2002/11/10
- Re: Linking in C++ mode, John Levon, 2002/11/10
- Re: Linking in C++ mode, Pierre Sarrazin, 2002/11/10
- Re: Linking in C++ mode, Earnie Boyd, 2002/11/10
- Re: Linking in C++ mode,
John Levon <=
- Re: Linking in C++ mode, Ralf Corsepius, 2002/11/10
- Re: Linking in C++ mode, Ralf Corsepius, 2002/11/10
- Re: Linking in C++ mode, John Levon, 2002/11/11
- Re: Linking in C++ mode, Alexandre Duret-Lutz, 2002/11/14
- Re: Linking in C++ mode, John Levon, 2002/11/14