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 <[email protected]>写道: > 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 >
