All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Dyga <adeon@tlen.pl>
To: linux-c-programming@vger.kernel.org
Subject: automake & C++ library problem
Date: Thu, 14 Oct 2004 18:05:31 +0000	[thread overview]
Message-ID: <200410141805.31790.adeon@tlen.pl> (raw)


Hello,

It's not exactly C programming related question, but I suspect that many of you, linux developers, know autotools well.

I want to create a C++ library from scratch. So I created project directory, with configure.in and Makefile.am
 in it, and  'src' subdirectory with Makefile.am.

Mentioned files contain:

configure.in:

 AC_INIT(deflatec++, 1.00)
 AM_INIT_AUTOMAKE
 AC_LANG(C++)
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_RANLIB
 AC_OUTPUT(Makefile src/Makefile)

Makefile.am:

 SUBDIRS = src

src/Makefile.am:

 bin_PROGRAMS = deflatetest
 deflatetest_SOURCES = deflatetest.cc
 include_HEADERS = DeflateCompress.h DeflateDecompress.h 
 lib_LIBRARIES = libdeflatec++.a
 libdeflatec++_a_SOURCES = DeflateCompress.cc DeflateDecompress.cc DeflateCompress.h DeflateDecompress.h 

(all files .h and .cc ofcourse exist)

Running autoreconf gives me the following error (originated from automake in fact):

/usr/share/automake-1.9/am/depend2.am: am__fastdepCC does not appear in AM_CONDITIONAL
src/Makefile.am: C source seen but `CC' is undefined
src/Makefile.am:
src/Makefile.am: The usual way to define `CC' is to add `AC_PROG_CC'
src/Makefile.am: to `configure.in' and run `autoconf' again.
autoreconf: automake failed with exit status: 1

And here I don't know what is going on, I don't know where automake see any C source... :(
But OK, I'm adding AC_PROG_CC to configure.in and running autoreconf, configure and make.
I'm getting this:

Making all in src
make[1]: Entering directory `/home/adeon/deflatec++/src'
make[1]: *** No rule to make target `libdeflatec++.c', needed by `libdeflatec++.o'.  Stop.
make[1]: Leaving directory `/home/adeon/deflatec++/src'
make: *** [all-recursive] Error 1

What am I doing wrong?

Greets
Adam

             reply	other threads:[~2004-10-14 18:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 18:05 Adam Dyga [this message]
2004-10-14 20:09 ` automake & C++ library problem Adam Dyga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410141805.31790.adeon@tlen.pl \
    --to=adeon@tlen.pl \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.