OK, I don't think I was very clear about what exactly
my problem is,
When I take the Makefile's that result from running
automake, and autoconf, and add --tag=CXX to the C++
variable definitions, the error message goes away and
it complies a shared library. This tag should be
automaticly put into the Makefile but it is not being done.
Now I also have some C source files in the project so
it needs to which to use C or C++.
Here is what happens:
creating ./config.status
creating Makefile
creating src/Makefile
creating src/TKernel/Makefile
creating src/TKMath/Makefile
creating src/TKG2d/Makefile
creating src/TKG3d/Makefile
creating src/TKGeomBase/Makefile
creating src/TKBRep/Makefile
creating config.h
boreas::/boreas/rbo/new/OCC/OCC (145)% make
make all-recursive
make[1]: Entering directory `/boreas/rbo/new/OCC/OCC'
Making all in src
make[2]: Entering directory `/boreas/rbo/new/OCC/OCC/src'
Making all in TKernel
make[3]: Entering directory `/boreas/rbo/new/OCC/OCC/src/TKernel'
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../..
-I../../inc -I../../drv/FSD -I../../drv/GraphDS -I../../drv/GraphTools
-I../../drv/MMgt -I../../drv/OSD -I../../drv/Plugin -I../../drv/Quantity
-I../../drv/Resource -I../../drv/SortTools -I../../drv/Standard
-I../../drv/StdFail -I../../drv/Storage -I../../drv/TColQuantity
-I../../drv/TColStd -I../../drv/TCollection -I../../drv/TShort
-I../../drv/Units -I../../drv/UnitsAPI -I../../drv/Dynamic
-I../../drv/Materials -I../../drv/Dico -g -O2 -c -o FSD_Archive.lo
`test -f ../../src/FSD/FSD_Archive.cxx || echo
'./'`../../src/FSD/FSD_Archive.cxx
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[3]: *** [FSD_Archive.lo] Error 1
make[3]: Leaving directory `/boreas/rbo/new/OCC/OCC/src/TKernel'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/boreas/rbo/new/OCC/OCC/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/boreas/rbo/new/OCC/OCC'
make: *** [all-recursive-am] Error 2
boreas::/boreas/rbo/new/OCC/OCC (146)%
Now let's go down to the Makefile that is dying, and
we'll see what's wrong:
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
$(CFLAGS)
CFLAGS = -g -O2
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES)
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXX
FLAGS) $(CXXFLAGS)
CXXFLAGS = -g -O2
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS)
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS)
$(AM_LDFLAGS) $(LDFLAGS) -o $@
Now if I go through and add "--tag=CXX" to the C++ lines,
LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(DEFS)
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(AM_CXXFLAGS)
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
I can now run "make" from the top level and the library will be built.
Perhaps there is some confustion using libtool with CXX and CC for
files in the same Makefile?
Robert Boehne Software Engineer
Ricardo Software Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email: [EMAIL PROTECTED]