[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Linking in C++ mode
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Linking in C++ mode |
Date: |
Thu, 14 Nov 2002 12:40:29 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu) |
>>> "Ralf" == Ralf Corsepius <address@hidden> writes:
[...]
Ralf> 2. Finding a way to convince automake to using "g++" to link a you
Ralf> program.
Ralf> Automake guesses upon the linker by using file name extensions. Your
Ralf> "main" is called "*.c", so it tries to use "gcc" instead of "g++".
Ralf> One way to work around this problem is renaming your "main" a c++ file
Ralf> name. Another way is to dive into automake internals and to override the
Ralf> linker (CXXLINK and CXXLD vs CCLINK and CCLD).
You can override the LINK command on a per-program basis:
bin_PROGRAMS = foo
foo_SOURCES = foo.c
foo_LINK = $(CXX) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
--
Alexandre Duret-Lutz
- Re: Linking in C++ mode, (continued)
- 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, 2002/11/10
- 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 <=
- Re: Linking in C++ mode, John Levon, 2002/11/14