ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
--- gcc response ---
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
/usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1 -quiet -v -I/usr/include p8.c -quiet -dumpbase p8.c -mtune=generic -auxbase p8 -version -o /tmp/cctWroQw.s
ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/lib/gcc/i386-redhat-linux/4.1.2/include
/usr/include
End of search list.
GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14) (i386-redhat-linux)
compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 6f8a93af44427a05901e7b3a98a7b357
p8.c:1:21: error: stdio.h : No such file or directory
p8.c: In function âmainâ:
p8.c:9: warning: incompatible implicit declaration of built-in function âstrcpyâ
p8.c:11: warning: incompatible implicit declaration of built-in function âprintfâ
--- end error response from gcc ---
That solved the problem with finding the headers, thanks. I did have one additional problem, the strcpy command was not found in stdio.h and I had to add string.h.
Please post code and compiler output in [code] tags to aid readability.
I notice that you are building these test programs as the root user. This is not good practice - you should use a non-privileged user account for all activities which do not require root access (i.e. all non-admin activities).
That solved the problem with finding the headers, thanks. I did have one additional problem, the strcpy command was not found in stdio.h and I had to add string.h.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.