Lib Files and Definitions

I use a couple of external libraries, and I do not need to include all the source and header files in the main source directory or in the project file. One option is to build the libraries as lib files and link them like this. However, I am not sure that the definitions will be evaluated before or after creating the lib file (which one?) . If before that, obviously, I can’t just pack them, because they may not work correctly on different compilers or systems.

So, if I cannot pack the libraries as lib files, is there a way to contact me in the c or cpp source files? Probably not, since they need to be compiled first, but maybe I'm wrong.

Edit: The following is an answer based question. Do you find it too much hassle to create a makefile that creates lib files? I would still not add sources to my project or source directory.

+3
source share
2 answers

A library is a binary, so everything is explicitly defined already in.

Just in order to place an order, the definitions are evaluated as the first stage of the compilation process - this step is called the preprocess. At this point, for each cpp file, one file is created containing everything #include'ed in it, the files are recursive and all macros are evaluated.

- release/ lib. 2 .

, , . , , , , , .

, - , .

3- . , .

, . - . . , , . , , .

. . , , , , . , .

Additioanal solution - , SCM ( , ) - checkhout. . , . subversion - svn: external. CVS AFAIK cvs-. , , , .

+2

define . , . , .

. , ( / DLL).

, / .

+2

All Articles