if [ $# -ne 1 ]
then
echo 'Usage: rootc foo.cpp'
exit 1
fi
SRC=$1
SRCEXT=`echo $SRC | sed -e 's/^.*\(....\)$/\1/'`
if [ $SRCEXT != ".cpp" ]
then
echo 'Error: the source file name MUST be ended with .cpp!'
exit 1
fi
EXE=`basename $1 .cpp`
CC=g++
CXXFLAGS=-Wno-deprecated
INCDIR=-I`root-config --incdir`
RTLIBS=`root-config --glibs`
$CC $CXXFLAGS $INCDIR $RTLIBS -o $EXE $SRC
阅读(451) | 评论(0) | 转发(0) |