Recently I tried compiling a simple Hello World with gcc but didn't have any luck. I got this message:
Code:
junk.c:1:19: error: stdio.h: No such file or directory
gcc was installed and configured correctly at one point but I think I changed the the .bash_profile since then.
I checked where stdio.h lives. The path is:
Code:
~/lib/gcc/i586-pc-linux-gnu/4.4.0/include/ssp
The following is my current .bash_profile. I changed some of the absolute paths to '~' for security.
Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
CC="gcc"
PATH=$PATH:$HOME/bin:/usr/bin
cd $HOME/html
LDFLAGS=-L/~/lib
CPPFLAGS=-I/~/lib/gcc/i586-pc-linux-gnu/4.4.0/include
export CPPFLAGS
export LDFLAGS
export PATH
export SBCL_HOME=~/lib/sbcl
I think at some point there was an LD_LIBRARY_PATH's path too.
Here is the contents of my hello world program:
Code:
#include <stdio.h>
main()
{
for(;;)
{
printf ("Hello World!\n");
}
}
I am not sure what to do. If somebody could help solve this problem for me I would appreciate it. Thank you
pmagunia