Closed Thread
Results 1 to 5 of 5

Thread: What's the difference between libraries and includes?

  1. #1
    cpthk is offline Newbie
    Join Date
    Jun 2009
    Posts
    2
    Rep Power
    0

    What's the difference between libraries and includes?

    Many IDE today could set libraries directories and includes directories. What is the difference between them?

    Thanks.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,478
    Blog Entries
    75
    Rep Power
    143

    Re: What's the difference between libraries and includes?

    You normally include header files, which are just source code. You link libraries, which are already compiled.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  4. #3
    cpthk is offline Newbie
    Join Date
    Jun 2009
    Posts
    2
    Rep Power
    0

    Re: What's the difference between libraries and includes?

    there are also a place to link binaries, so what's the difference between binaries and libraries?

    For example, in Dev C++, in the options:
    wagjo.com/fileadmin/wagjo/images/boost/devc2.gif
    (sorry, it's a link to a image, I cannot post a link or image yet)

  5. #4
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: What's the difference between libraries and includes?

    Quote Originally Posted by cpthk View Post
    Many IDE today could set libraries directories and includes directories. What is the difference between them?

    Thanks.
    The 'includes' provide the compiler with a way of determining where aspects of your code are defined. These 'includes' in conjunction with your preprocessor directives determine your translation units. The translation unit is that part of the code that is built into your executable.

    During the build stage you will encounter a stage called 'linking' that refers to these libraries in order to 'resolve externals'. When there are conflicts or ambiguities between libraries and the includes that determine which libraries are to be included, you end up with 'unresolved externals' that don't give you very much information on what went wrong. Why not much information? Because the problem is ambiguous, so cannot be pinpointed by the linker.

  6. #5
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: What's the difference between libraries and includes?

    Quote Originally Posted by cpthk View Post
    there are also a place to link binaries, so what's the difference between binaries and libraries?

    For example, in Dev C++, in the options:
    wagjo.com/fileadmin/wagjo/images/boost/devc2.gif
    (sorry, it's a link to a image, I cannot post a link or image yet)
    See above for libraries. 'Binaries' are files that are not in a text format, so cannot be directly read by a text editor, for example. Binaries are files with a .exe, .dll or .obj extension, for example.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. What are these libraries?
    By Hunter100 in forum C and C++
    Replies: 2
    Last Post: 03-15-2010, 12:40 PM
  2. Replies: 2
    Last Post: 12-14-2009, 10:57 AM
  3. Simple Server Includes Malfunctioning
    By Ruined1 in forum Perl
    Replies: 2
    Last Post: 08-28-2009, 10:17 AM
  4. includes
    By Frantic in forum PHP Development
    Replies: 2
    Last Post: 08-27-2006, 10:31 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts