LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-07-2004, 04:46 PM   #1
mu664life
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Rep: Reputation: 0
force gcc to compile in different version???


HI ALL....
i just installed KNOPPIX 3.3......and i'm trying to compile a project that i have.....but it has many errors and i found out that it uses the gcc version 3.3.3
i need to use gcc version 2.95.3
i downloaded version 2.95.3 but have no idea how to install it....

i later found out that KNOPPIX has 2.95 and 3.3 gcc installed...but 3.3 is the default........
can i force the comilper to compile with the 2.95 instead of the 3.3????

how would i type it under the kernal window?

like this???
%g++ -v 2.95 main.cc

please help...thanx
 
Old 04-07-2004, 10:48 PM   #2
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
from the few minutes of reading the gcc man page, yeah you would use the Target option,
-V , lowercase -v is version of gcc, not a target option , replace the -v with -V .
 
Old 04-07-2004, 10:53 PM   #3
mu664life
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
i'm sorry...but i'm very very new at this.....so when you say target option, it means where the version is store right?

so....
%:gcc -V <target>

right???

if so ..... how would i find out where and which file do i point it to?
can you show me a example???
 
Old 04-07-2004, 11:24 PM   #4
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
I usually never compile syuff by hand yet, cause I don't program in C.

Just compile like you would normally, using gcc -V 2.95

right?

'man gcc'


youre NEW at this? what are you doing compiling something ?

What?
Your trippin me out bro.
 
Old 04-07-2004, 11:52 PM   #5
mu664life
LQ Newbie
 
Registered: Dec 2003
Posts: 9

Original Poster
Rep: Reputation: 0
yeah...i normally compile everything in window with visual C++ .....but after it crash on me while i was working on a 500 line program.....(wich i didn't save)......i realized that microsoft suck ass.........

so i'm trying to convert myself to linux...but i never ever touched linux in my life.....so everything is really new to me..........(took me forever to figur out how to install it)........
 
Old 04-07-2004, 11:56 PM   #6
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
gcc -V 2.95 helloworld.c

I guess.
 
  


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
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Wrong GCC version during compile? raid517 Linux - Software 4 09-14-2005 08:46 AM
redhat fedora gcc version (compiled for 2.4.20) doesn't match kernel version 2.4.22 start1000 Linux - Software 0 03-16-2004 08:17 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 12:07 AM
Sample Driver Module incompatibility with Kernel version (or gcc version) jvs Linux - General 1 06-07-2002 01:40 AM


All times are GMT -5. The time now is 09:05 PM.

Main Menu
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