LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2001, 09:42 PM   #1
mr.moto
LQ Newbie
 
Registered: Dec 2001
Posts: 15

Rep: Reputation: 0
Question getting message to set environmet variable


I assume I do this in .profile with an editor.

If so what do I put there ?


Trying to set the CC variable ????
 
Old 12-18-2001, 01:00 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You could add the line (w/o quotes)
"cc=gcc"
and then add "cc" to the export line,
but unless youve got something weird of a distro this shouldnt be necessary. "Modern" sources come with "configure" which tracks down the values for the compiler on your system.
 
Old 01-15-2002, 09:48 PM   #3
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
It depends on what shell you use. If you use bash ( most distro's )

try 'export CC=gcc'

Basically 'export variable=value'. This differ's from regular bourne shell where you have to separate the export command, eg 'CC=gcc ; export CC' And C shell, tcsh, you can get away with 'setenv CC="gcc"'

You need to add the export line in your .profile only if you want that variable to be set whenever you log into the computer.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set variable with value of another Ephracis Programming 7 12-25-2004 10:34 AM
Perl Message board variable cadj Programming 3 04-21-2004 06:23 AM
set environment variable Jongi Linux - Newbie 7 03-01-2004 04:34 AM
MAIL variable not set in X tjpick Slackware 1 08-14-2003 02:27 AM
How to set a environment variable in rh? yenonn Linux - Newbie 11 02-21-2003 10:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:47 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
Open Source Consulting | Domain Registration