Was koennte ich denn falsch gemacht haben? Ich hab ein kleineres Projekt, bis noch nur ca. 10 Dateien und moechte die gerne ueber make & co. verwalten.
Dazu hab ich eine configure.in Datei angelegt:
Code:
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 FULL-PACKAGE-NAME="test";
5 VERSION="0.1.0";
6 BUG-REPORT-ADDRESS="no-replay@mai.com";
7
8 AC_PREREQ(2.60a)
9 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
10 AM_INIT_AUTOMAKE
11 AC_CONFIG_SRCDIR([src/main.cc])
12 AC_CONFIG_HEADER([config.h])
13
14 # Checks for programs.
15 AC_PROG_CXX
16 AC_PROG_INSTALL
17 AC_PROG_MAKE_SET
18 PKG_PROG_PKG_CONFIG([0.14.0])
19
20 # Checks for libraries.
21 PKG_CHECK_MODULES(GTKMM,
22 [gtkmm-2.4 >= 2.4.0],
23 [AC_DEFINE([HAVE_GTKMM],,[GTKmm is supported])],
24 [AC_MSG_RESULT(gtkmm-2.4 not found!!)])
25 PKG_CHECK_MODULES(GLIBMM,
26 [glibmm-2.4 >= 2.4.0],
27 [AC_DEFINE([HAVE_GLIBMM],,[Glibmm is supported])],
28 [AC_MSG_RESULT(glibmm-2.4 not found!!)])
29 CXXFLAGS="$CXXFLAGS $GTKMM_CFLAGS"
30 LDXXFLAGS="$LDXXFLAGS $GTKMM_LIBS"
31
32 # Checks for header files.
33
34 # Checks for typedefs, structures, and compiler characteristics.
35 AC_HEADER_STDBOOL
36
37 # Checks for library functions.
38
39 AC_CONFIG_FILES([Makefile
40 src/Makefile])
41 AC_OUTPUT
eine Makefile.in (enthaelt die Kompilierregeln), Makefile.am die auf das Verzeichnis src verweist und dort noch ne Makefile.am die alle zu kompilierenden Dateien enthaelt.
An sich nicht so kompliziert und es funktioniert fuers Kompilieren an sich ganz gut, keine Probleme.
Kommt er allerdings zum Linken dann krieg ich 100e von Fehlern. Das liegt daran dass er nicht die LDXXFLAGS verwendet sondern die CXXFLAGS als zusaetzliche Flags.
Jemand ne Idee warum das passiert ?
Wenn ich im orginalen Makefile.in die Ersetzungen durch gueltige Befehle austausche kompiliert das Projekt naehmlich ohne Probleme durch ....
Bin ratlos ...
Hilfe ....
mfg nul
Lesezeichen