Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-07-2010, 08:24 PM   #1
LQ Newbie
Registered: Dec 2010
Distribution: Ubuntu, Fedora
Posts: 7

Rep: Reputation: 0
Creating link to newly installed g++

I have installed gcc-3.3 & g++-3.3 in ubuntu 9.04. Now I want to change the default compiler as gcc-3.3/g++-3.3. After creating links to newly installed gcc/g++, gcc works fine but g++ doesn't work.
When I give "$which gcc" or "$gcc --version" it works fine, but when I give "$which g++" it gives nothing and also "$g++ --version" it gives an error "the program 'g++' can be found in the following packages: * g++..."
When I installed gcc I gave the command "$configure --perfix=/opt/gcc33 --program-suffix=33 --enable-languages=c,c++" .
When I give "$which g++33" and "$g++33 --version", work fine.

I tried following:
$export CXX=g++33
$sudo ln -s g++-3.3 g++
Nothing happens.
I am very new in Linux and I need to install ns2.1a9b in gcc-3.3. Please help me.
Old 12-08-2010, 04:19 AM   #2
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 673

Rep: Reputation: 94
you should create symbolic links to g++ in several places

First find every g++33 occurrence
$whereis g++33
after that add a symbolic link to ever g++ occurrence with ln -s

I'm guessing g++33 would be at least in /usr/bin

and here's a example
#Let's say whereis found g++33 in /usr/bin
$sudo ln -s /usr/bin/g++33 /usr/bin/g++
go and ln -s ever occurrence of g++33 similar to the example and you will be fine.
Old 12-08-2010, 08:57 AM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,698

Rep: Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291Reputation: 3291
The usual solution to have gcc / g++ version 3.3 on Ubuntu 9.10 is :
Use the packages from Ubuntu 8.04 Hardy. ( It's version 3.3.6 ).

Using gcc-3.3 and g++-3.3 in ns-2.1b9/
Edit the , line 36 - 37 to
CC = gcc-3.3
CPP = g++-3.3
( Please replace with your file names. gcc33 ? g++33 ? ).

But I am not sure, you can compile ns-2.1b9 with g++ 3.3.
Will usually require gcc / g++ version 3.2 , only found on CentOS 3.9 .


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to identify newly installed o/s manikandan_vs Linux - Newbie 7 08-19-2010 04:35 PM
Cannot boot already installed ubuntu on newly installed win xp abhi_337 Ubuntu 1 07-13-2006 03:33 AM
help with newly installed slackware 10.2!!!!! D_O_Y_L_E Slackware 4 03-17-2006 03:43 PM
Where are my newly installed progams? behnt Linux - Newbie 9 04-16-2005 04:46 PM
Problem in creating filesystem for newly created partition. appas Linux - Software 2 08-21-2004 03:39 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration