Thread: "linking"

  1. #1
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    "linking"

    I do not know what "linking" is. Well, I know it links source files, but how is this done?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    The compiler turns your source files into object files. For small programs, this will be a single file, but for large projects there will be many source files, not necessarily compiled at the same time.

    The linker takes all your object files, combines them with the runtime library (the bit which estabishes an environment which results in main() being called), and also searches additional libraries for library routines which you may have used in your code.

    If you're using gcc, then the -v command line option shows all the intermediate steps of pre-processor, compile, assemble, link
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    does anybody know how to do that in Dev-C++ ??

Popular pages Recent additions subscribe to a feed