Re: .c/.cpp - mapping to compiler

Daniel Dittmar <[email protected]> Wed, 05 Feb 2003 00:59:03 +0100
Newsgroups gmane.comp.db.sapdb.sources
Organization SAP AG
Message-ID <[email protected]>
Döhr, Markus Hermeskeil wrote:
> IspcCGenHFile.cpp fast
> cc: Warning: illegal option -nstances=static
> cc: No input file specified, no output generated
> Error while executing "cc -DREL30 -DSVR4 -DI386 -DSAG -I/home/doehrm/sa\
> pdb/TOOLSRC/sys/wrk/incl/SAPDB/STLport/stlport -I/home/doehrm/sapdb/TOOL\
> SRC/sys/wrk/incl/SAPDB -I/home/doehrm/sapdb/TOOLSRC/usr/incl -I/home/doe\
> hrm/sapdb/TOOLSRC/sys/wrk/incl -I/home/doehrm/sapdb/TOOLSRC/sys/wrk/incl\
> /SAPDB -Xa -D_SVID -DSOLARIS7 -KPIC -instances=static -DFAST=FAST -DSAPD\
> B_FAST -xO4 -I/home/doehrm/sapdb/TOOLSRC/incl -c IspcCGenHFile.cpp"
> 
> Since this is a .cpp file it should be compiled with CC but it's using cc. 
> 
> toolvarsDump.pl is showing, that the compilers are detected correctly:
> 
> [...]
> CC
> cc
> [...]
> CXX
> CC
> [...]
> 
> Can anyone please give me a hint where to look? 
> 

The script to compile C/C++ sources is $TOOL/bin/compc.pl.

The part
		} elsif ($EXT eq ".cpp" || $language eq 'x')
		{
			$cc = $CXX;
should really choose the C++ compiler. Maybe you can add a few print 
statements to see what's going on.

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org