I'm using the GCC compiler for compiling C source code. I am learning socket programming but the source code I have from a book I got, I can't get to compile, It is because certain header files are in the source code, and so I put the entire directory of files that came with the book into /usr/include so shouldn't it work now, cause it doesn't. Is there something else I have to do?
Can't Compile
Started by tedmp0816, Oct 16 2009 08:06 PM
4 replies to this topic
#1
Posted 16 October 2009 - 08:06 PM
|
|
|
#2
Posted 16 October 2009 - 09:23 PM
Post up your code and what error your getting.
#3
Posted 17 October 2009 - 12:40 AM
I hope you're using some version of Linux and not Cygwin...that'd be much harder to debug.
sudo rm -rf /
#4
Posted 19 October 2009 - 09:05 PM
I am using linux, and I am using source code from Internetworking with TCP/IP Vol.1: Principles, Protocols, and Architecture, I got it working eventually because I didn't realize there was a makefile for it. But in general if we want to include a header file and we put it in /usr/include should it work?
#5
Posted 20 October 2009 - 12:00 AM
The makefile probably has instructions to link with the appropriate library. Some headers need libraries or you will get an error. Read this for more information.
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)
Download the new operating system programming kit! (some assembly required)


Sign In
Create Account


Back to top










