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: 杨觅
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:51:14 +0800

Thank you Ralf,

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. 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.

Please help me to find out the key. Thank you again for your answer :)

Cheers,
Bill

在 2010年2月25日 上午3:53,Ralf Wildenhues <address@hidden>写道:

> Hello Bill,
>
> * Mi Yang (杨觅) wrote on Wed, Feb 24, 2010 at 03:34:26PM CET:
> > I met a strange problem when "automake -a":
> >
> > core/Makefile.am:3: variable `main_SOURCES' is defined but no program or
> > core/Makefile.am:3: library has `main' as canonical name (possible typo)
>
> Well, it is meant as a help for typos.  You define the variable
> main_SOURCES, which usually means that the program named 'main' is to
> be compiled from the source files listed in that variable.  For the
> program to be registered as such, add it to bin_PROGRAMS, or
> noinst_PROGRAMS or similar, e.g.,
>  bin_PROGRAMS = main
>
> If that doesn't help you, then it would be good if you showed us your
> core/Makefile.am so we could help better.
>
> Cheers,
> Ralf
>


reply via email to

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