c++ - Why do you have to link libraries AND set include directories -


hey i'm little confused on why, in msvs++ 2010 have have include directories when headers , cpp files inside static libray or static library project in case.

i made static library project cmake, , source file told set same i'm told make include directory... seems have 2 of same cpp , header files.. except ones included statically in sollution... why?

because vs++ while abstracting underlying implementation not hide completely.

include directories , libraries targeted @ different phase of process, traditionally handled different programs. include directories preprocessor, libraries linker. programs called (or part of?) vc++, interface still shows underlying structure.

there systems allows mark needed libraries in source code (and in header) use of pragmas. have several disadvantages:

  • non standard

  • you can't substitute libraries (say debug/instrumented/release, single thread/multi thread, ...)


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -