Jump to content

Can't Compile

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
tedmp0816

tedmp0816

    Newbie

  • Members
  • PipPip
  • 12 posts
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?

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Post up your code and what error your getting.

#3
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
I hope you're using some version of Linux and not Cygwin...that'd be much harder to debug.
sudo rm -rf /

#4
tedmp0816

tedmp0816

    Newbie

  • Members
  • PipPip
  • 12 posts
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
Guest

Guest

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 3,414 posts
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)