Go Back   CodeCall Programming Forum > Software Development > C and C++
Register Blogs Search Today's Posts Mark Forums Read

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-29-2009, 05:59 PM
Newbie
 
Join Date: Jun 2009
Posts: 2
cpthk is an unknown quantity at this point
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-29-2009, 06:08 PM
WingedPanther's Avatar
Super Moderator
 
Join Date: Jul 2006
Age: 36
Posts: 11,435
WingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud ofWingedPanther has much to be proud of
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-29-2009, 06:38 PM
Newbie
 
Join Date: Jun 2009
Posts: 2
cpthk is an unknown quantity at this point
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-29-2009, 06:52 PM
Programmer
 
Join Date: Jun 2009
Posts: 104
Mathematix is an unknown quantity at this point
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-29-2009, 06:54 PM
Programmer
 
Join Date: Jun 2009
Posts: 104
Mathematix is an unknown quantity at this point
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -5. The time now is 11:00 AM.


vBulletin v3.8.0 ©2010, Jelsoft Enterprises Ltd.


no new posts

LinkBacks Enabled by vBSEO 3.1.0