   Include and Lib
  Hey guys, me again.I realise this may be a ridiculous question, but I've never really thought about it until now.Let's start with a little context. I have a project where I have used the MySQL development files so that's the Include and Lib files. I have also used a library (MySQL++), again Include and Lib files.When compiling the entire project, what's the difference? It's confused me a little bit, because I already have a mysql and mysql++ dll that links with the executable. I'm just not 100% on the difference between include and lib files.My idea, at the moment is that the include files are necessary to avoid compile time errors (header not found etc) and when the files are being linked together the linker uses the lib files to link everything together.Hopefully, I'm on the right lines somewhat.Cheers guys.Ray   
Quote:Original post by raydeyMy idea, at the moment is that the include files are necessary to avoid compile time errors (header not found etc) and when the files are being linked together the linker uses the lib files to link everything together.Yup, that's pretty much right.  The header files just say "Hey, these things exist, this is what they're named, and this is what they look like," but it doesn't tell the compiler what those things actually are.  Rather, the lib files contain the actual definition, which the linker then uses to complete the building process of your program.  Without the headers, the compiler doesn't know what things should look like or what to expect, and without the lib files the linker wouldn't have any actual definitions it could use.   ;  Cheers mate, that helped a lot :)   ;  Indeed, the lib files are like a compiled replacement for the source (.c/.cpp) files. So you can replace the lib with the source files which generated it. It's usually not a good idea, though, but I think it's something worth of knowing.   