+ Reply to Thread
Results 1 to 5 of 5

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

  1. #1
    Newbie cpthk is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    2

    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. #2
    Super Moderator WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther has much to be proud of WingedPanther's Avatar
    Join Date
    Jul 2006
    Age
    36
    Posts
    11,680
    Blog Entries
    57

    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.
    CodeCall Blog | CodeCall Wiki | Shareware
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  3. #3
    Newbie cpthk is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    2

    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)

  4. #4
    Programmer Mathematix is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    104

    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.

  5. #5
    Programmer Mathematix is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    104

    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.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

     

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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