[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
Re: Problem of: variable `main_SOURCES' is defined but no program or library has `main' as canonical name (possible typo)
Thu, 25 Feb 2010 21:36:01 +0100
* 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
> 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
> 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.