[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linking in C++ mode
From: |
John Levon |
Subject: |
Linking in C++ mode |
Date: |
Sun, 10 Nov 2002 02:39:52 +0000 |
User-agent: |
Mutt/1.3.25i |
We have a C program which links to a C++ library, and we need to
tell automake to do the link in C++ mode to avoid undefined references
to the C++ standard library. How can we do it ?
The Makefile.am looks as follows :
---snip---
dist_sources = oprofiled.c opd_stats.c opd_kernel.c opd_image.c
opd_sample_files.c \
opd_image.h opd_printf.h opd_stats.h opd_kernel.h opd_sample_files.h
p_module.h
EXTRA_DIST = $(dist_sources)
if kernel_support
AM_CPPFLAGS=-I ${top_srcdir}/libabi -I ${top_srcdir}/libutil -I
${top_srcdir}/libop -I ${top_srcdir}/libdb
bin_PROGRAMS = oprofiled
oprofiled_SOURCES = $(dist_sources)
if enable_abi
oprofiled_LDADD = ../libabi/libabi.a ../libdb/libdb.a ../libop/libop.a
../libutil/libutil.a
else
oprofiled_LDADD = ../libdb/libdb.a ../libop/libop.a ../libutil/libutil.a
endif
endif
---snip---
libabi is the C++ library. It would be good to have a solution that
works for automake 1.5 upwards ...
(also, what is the "preferred" way to add a C/C++ flag from configure.in
?)
thanks
john
- Linking in C++ mode,
John Levon <=
- 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, 2002/11/10