automake
[Top][All Lists]
Advanced

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

Re: cannot specify -o with -c or -S


From: Ralf Corsepius
Subject: Re: cannot specify -o with -c or -S
Date: Thu, 25 Feb 2010 06:47:31 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

On 02/25/2010 06:16 AM, rrlangly wrote:

Does anyone have an idea as to why I'd get the following error when compiling
my program using autotools. This used to compile and run, then I added new
code and linked against a new library, and now I get this.

g++ -DHAVE_CONFIG_H -I. -I../../GXT/src -I..  -I../../GXT/include
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I
/usr/include/festival -I /usr/include/speech-tools -I/usr/include/boost -I
/usr/local/include -I /usr/local/include/OGRE/Terrain
-I/usr/local/include/OGRE/Paging -I/usr/local/include/OGRE -I
/opt/ion-inb-1.1.0/include -I/home/priggy/Projects/subA/libbern
/home/priggy/Projects/subA/asn.1/bern-sn.h
/home/priggy/Projects/subA/util/bern-ut.h
/home/priggy/Projects/subA/util/bern-no.h
/home/priggy/Projects/subA/util/bern-res.h
/home/priggy/Projects/subA/util/bern-am.h
/home/priggy/Projects/subA/util/bern-da.h
/home/priggy/Projects/subA/util/bern-v.h
/home/priggy/Projects/subA/util/bern-ver.h
/home/priggy/Projects/subA/libbbc/bbc-c.h
The cause for the compiler to abort is this list of headers above.

-pthread -I/usr/local/include
-I/usr/local/include/OGRE   -I/usr/include/OIS   -g -O2 -MT gtx-main.o -MD
-MP -MF .deps/gtx-main.Tpo -c -o gtx-main.o `test -f 'main.cpp' || echo
'../../GXT/src/'`main.cpp
g++: cannot specify -o with -c or -S with multiple files
make[3]: *** [gtx-main.o] Error 1


This isn't the exact Makefile (which I don't have access to now), but it
contains the very same macros, or not sure what they're called (e.g.
_SOURCES, _CPPFLAGS, _LDADD, etc...).

--- Makefile.am ---
bin_PROGRAMS = myprog

myprog_SOURCES =        \
     main.cpp       \
     classb.cpp       \
     classc.cpp       \
     classd.cpp

myprog_CXXFLAGS= $(OGRE_CFLAGS) $(OIS_CFLAGS)

myprog_CPPFLAGS = -I$(top_srcdir)/include

myprog_LDFLAGS = -L/usr/lib64 -L/usr/local/lib64 -L/usr/local/lib

myprog_LDADD = $(OGRE_LIBS) $(OIS_LIBS) -lopenal

SUBDIRS= libs



Any helpl much appreciated.
Well, this Makefile.am doesn't correspond to the breakdown above.

You will want to check for where this series of *.h's originates from.

Ralf




reply via email to

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