CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Gcc compiler (https://www.cfd-online.com/Forums/openfoam-solving/59973-gcc-compiler.html)

shuo October 12, 2006 01:46

Hi How do I redfine the pat
 
Hi

How do I redfine the path for the gcc4-0 C compiler downloaded using synaptic package manager (Ubuntu 6.04) so that when I try to compile C++ codes it doesn't keep refering to OpenFOAM?

ie
/home/shuo/OpenFOAM/linux/gcc-4.1.0/bin/../lib/gcc/i686-pc-linux-gnu/4.1.0/../.. /../../include/c++/4.1.0/fstream: In instantiation of 'std::basic_ofstream<wchar_t,> >':


Shuo

dmoroian October 12, 2006 02:55

Remove the sourcing of OpenFOA
 
Remove the sourcing of OpenFOAM bashrc script from your local ~/.bashrc, and you're back to the system compiler.

Dragos

shuo October 12, 2006 04:29

I deleted the last line in the
 
I deleted the last line in the .bashrc file and updatedthe sourcing environment by typing . $HOME/.bashrc. It still gave me the same error message

Shuo

dmoroian October 12, 2006 09:47

It's not enough to just rerun
 
It's not enough to just rerun your .bashrc, you have to either logout, or close xterm, or start a new xterm.

Dragos

shuo October 13, 2006 19:59

When I delete the last line in
 
When I delete the last line in the .bashrc, the utilities ie blockMesh does not work and it can't find the gcc bash command either.

SHuo

dmoroian October 15, 2006 05:43

This is very strange, since yo
 
This is very strange, since you say that you have installed gcc. Try to see if it is in /usr/bin/gcc (this is the usual place of the system compiler). If it is there, then it's just a problem with you PATH environment variable, which should include /usr/bin directory.

Dragos


All times are GMT -4. The time now is 18:40.