automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem of: variable `main_SOURCES' is defined but no program or lib


From: Ralf Wildenhues
Subject: Re: Problem of: variable `main_SOURCES' is defined but no program or library has `main' as canonical name (possible typo)
Date: Thu, 25 Feb 2010 21:36:01 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

* Mi Yang (杨觅) wrote on Thu, Feb 25, 2010 at 02:51:14PM CET:
> Actually I know the rules of Makefile.am. But it just don't wokr as I
> expected.
> 
> My core/Makefile.am looks like this:
> 
> bin_PROGRAMS = main
> main_SOURCES = filemain.cpp
> 
> Then it returned the error msg.

That doesn't make sense to me.  Can you prepare and send a tarball
(.tar.gz file) containing this Makefile.am file that causes the error
message, and the configure.ac file you're using?  Also, please show the
output of
  autoconf --version
  automake --version

> But if I make it like this:
> 
> lib_LTLIBRARIES = main.la
> _main_la_SOURCES = filemain.cpp
> 
> Everything is OK and I am able to see the generated file main.so.

This looks wrong, too.  automake should be complaining about the missing
'lib' prefix of 'main.la' in the lib_LTLIBRARIES line (unless you also
have a 'main_la_LDFLAGS = -module' line somewhere else, and the next
line should set main_la_SOURCES not _main_la_SOURCES.

Maybe this is some character encoding issue?  I'd need the files to be
able to say.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]