[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Libtool and C++
From: |
Lucas Correia Villa Real |
Subject: |
Libtool and C++ |
Date: |
Wed, 4 Sep 2002 16:34:18 -0300 |
Hi,
I have been using a hand-written Makefile for a program for a long time,
when I decided to move to autoconf/automake/libtool. The program is
written in C++ and is in reality a library. I was successfully creating
my shared library libXYZ.a with "ar cr libXYZ.a <files.o>", and any
program linked with it could run fine. Now when I moved to auto*/libtool,
the same applications when linked to the resulting library segfaults.
Below are my configure.in and my src/Makefile.am files.
Any help will be very appreciated
Lucas
-- configure.in --
AC_INIT(src/test.C)
AM_INIT_AUTOMAKE(Test, [1.0])
AC_ISC_POSIX
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_CHECK_LIB(pthread, pthread_create, LIBS="-lpthread",
AC_MSG_ERROR([*** libpthread not found. Check 'config.log' for more
details.]))
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MMAP
AC_CHECK_LIBM
AC_SUBST(LIBM)
AC_CHECK_FUNCS(strerror)
AC_OUTPUT([Makefile example/Makefile src/Makefile])
-- src/Makefile.am --
AUTOMAKE_OPTIONS = foreign gnu
lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = test.C debug.C internals.C
INCLUDES = -I../include
CXXFLAGS = -Wall
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Libtool and C++,
Lucas Correia Villa Real <=