[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Libtool library used but `LIBTOOL' is undefined??
From: |
kknd1233 |
Subject: |
Libtool library used but `LIBTOOL' is undefined?? |
Date: |
Tue, 4 Jan 2011 15:14:20 -0800 (PST) |
Hi everyone. I am new to libtool.
I was following the libtool tutorial to write a HelloWorld example of
libtool:
@lib/ say.c:
#include <config.h>
#include <stdio.h>
void say_hello (void)
{
puts ("Hello World!");
puts ("This is " PACKAGE_STRING ".");
}
@lib/ say.h:
void say_hello (void);
@src/ main.c:
#include "say.h"
int main (void)
{
say_hello ();
return 0;
}
@lib/Makele.am:
lib_LTLIBRARIES = libhello.la
libhello_la_SOURCES = say.c say.h
@src/Makele.am:
AM_CPPFLAGS = -I$(srcdir)/../lib
bin_PROGRAMS = hello
hello_SOURCES = main.c
hello_LDADD = ../lib/libhello.la
@Makele.am:
SUBDIRS = lib src
ACLOCAL_AMFLAGS = -I m4
@congure.ac:
AC_INIT([amhello], [2.0], address@hidden)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
LT_INIT
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile])
AC_OUTPUT
And then when I run the command 'autoreconf --install', it said an error
message like
"
lib/Makefile.am:1: Libtool library used but `LIBTOOL' is undefined
lib/Makefile.am:1: The usual way to define `LIBTOOL' is to add
`AC_PROG_LIBTOOL'
lib/Makefile.am:1: to `configure.ac' and run `aclocal' and `autoconf'
again.
lib/Makefile.am:1: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
lib/Makefile.am:1: its definition is in aclocal's search path.
"
I search on Google, someone said creating a symlink of aclocal will fix it,
or download the latest libtool (my libtool is 2.4); also I followed above
error message but neither of them works.
Could anybody please advise me how to fix the problem and run my little toy
code?? Thank you!
--
View this message in context:
http://old.nabble.com/Libtool-library-used-but-%60LIBTOOL%27-is-undefined---tp30591521p30591521.html
Sent from the Gnu - Libtool - Discuss mailing list archive at Nabble.com.
- Libtool library used but `LIBTOOL' is undefined??,
kknd1233 <=