LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-14-2011, 09:27 AM   #1
Taylrl
Member
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 34

Rep: Reputation: 0
problem setting up gcc. I think I need to find the bash_profile file?


Hi,

I have used linux somewhat at university, but there everything was already pre-set up and there was always an administrator to help out with any problems. Now I am back at home and would like to run some programs on my graphics card. This needs the nvidia compiler "nvcc". I have this installed but I think this compiler needs to invoke gcc and the header files are in a different location. I could copy them all over into the directory I am working in but I think I need to change something to do with $PATH in the bash_profile file. I cant seem to find this file. Can anyone help me?

Thanks in advance!
 
Old 11-14-2011, 09:42 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
It's called .bash_profile (notice the leading ".", that means its hidden from a normal "ls", but it's there. It's in your home directory. Use "ls -a" to show hidden files.
 
Old 11-14-2011, 09:48 AM   #3
Taylrl
Member
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks!

If I am looking in the right place then I can only find .bash_history .bash_logout and .bashrc. Are any of these the right files?
 
Old 11-14-2011, 10:02 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,110

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
^ .profile maybe ?
 
Old 11-14-2011, 11:35 AM   #5
Taylrl
Member
 
Registered: Jul 2010
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 0
Thanks!

Yeap it was indeed the .profile file I think. The problem I am having now is that gcc can't find any of the .h files. I have found them on my computer but how do I get gcc to look for them in the correct directory? Thanks so much for your help :-)
 
Old 11-14-2011, 11:47 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,459

Rep: Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053Reputation: 2053
use the -I flag in gcc

eg: if your .h files are in /usr/include/, you would add
Code:
-I/usr/include
to your gcc command.
 
  


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
Problem with the bash_profile [ unexpected end of the file ] shivamkalra Linux - Newbie 3 05-18-2011 02:14 PM
Problem when setting up bash_profile elgyn Linux From Scratch 5 07-14-2010 08:31 PM
Lost gcc .bash_profile Paths pmagunia Programming 2 05-05-2010 07:03 PM
Sysdate setting in bash_profile malickhat Linux - Newbie 2 03-29-2010 01:39 AM
Trying to load a driver - gcc can't find a file tilaat Linux - Newbie 2 02-14-2005 04:35 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration