Click to See Complete Forum and Search --> : g++/g++296


kettle
01-27-2006, 12:35 AM
Hi all,
How can I link my compiler command so as that it will automatically direct any 'g++' calls to 'g++296'?
I am running Redhat 7.3 using g++ v. 2.96. The command I typically use to execute g++ is 'g++296'. When I try to compile new code from outside sources I often get something like the following error:

g++ -c -O3 -DSWAP_BYTES -I../include -I../../SVDLIBC++64intel/ AbsoluteSelectNgrams.cpp -o obj/linux/four_byte_ids/AbsoluteSelectNgrams.o
make[1]: g++: Command not found

How can I link my compiler command so as that it will automatically direct any 'g++' calls to 'g++296'?

je_fro
01-27-2006, 03:43 AM
I'm not sure this is what you want to do, but you could alias it in ~.bashrc like so:
$ grep alias .bashrc

alias eject="sudo eject"
alias nano="nano -w"
alias cdrecord="cdrecord dev=/dev/dvdburner driveropts=burnfree"

truls
01-27-2006, 05:14 AM
Find out where the g++296 command is by issuing the command 'which g++296', go to this directory and create a soft link to this command with the name g++: ln -s g++296 g++

I think that is the correct syntax anyways. Try it out and see what happens. I'm not sure, but I think that for some systems the g++ is just a script that runs gcc with the c++ option.