LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



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

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


Hello,
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, 05:19 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: Tengiz
Distribution: Slackware64 14.1
Posts: 671

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

First find every g++33 occurrence
Code:
$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
Code:
#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, 09:57 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
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 Makefile.in , 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 .
..
 
  


Reply


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 05:35 PM
Cannot boot already installed ubuntu on newly installed win xp abhi_337 Ubuntu 1 07-13-2006 04:33 AM
help with newly installed slackware 10.2!!!!! D_O_Y_L_E Slackware 4 03-17-2006 04:43 PM
Where are my newly installed progams? behnt Linux - Newbie 9 04-16-2005 05:46 PM
Problem in creating filesystem for newly created partition. appas Linux - Software 2 08-21-2004 04:39 AM


All times are GMT -5. The time now is 04:46 AM.

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