>>> "Ralf" == Ralf Corsepius <[EMAIL PROTECTED]> 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



Reply via email to