Are there any disadvantages to “multi-processor compilation” in Visual Studio?

The documentation for /MP says: Incompatible Options and Language Features The /MP option is incompatible with some compiler options and language features. If you use an incompatible compiler option with the /MP option, the compiler issues warning D9030 and ignores the /MP option. If you use an incompatible language feature, the compiler issues error C2813then … Read more

What do the numbers mean in the preprocessed .i files when compiling C with gcc?

The numbers following the filename are flags: 1: This indicates the start of a new file. 2: This indicates returning to a file (after having included another file). 3: This indicates that the following text comes from a system header file, so certain warnings should be suppressed. 4: This indicates that the following text should … Read more

What is the main difference between a Compiler and a Transpiler?

They’re essentially the same: take source code and transform it to something else. The difference is that compiler usually produces a directly usable artifact (executable binary of some sort). Example: C (produces binary), C# (produces bytecode). Whereas transpiler produces another form of source code (in another language, for example), which is not directly runnable and … Read more

Compile multiple C files with make

The links posted are all good. For you particular case you can try this. Essentially all Makefiles follow this pattern. Everything else is shortcuts and macros. program: main.o dbAdapter.o gcc -o program main.o dbAdapter.o main.o: main.c dbAdapter.h gcc -c main.c dbAdapter.o dbAdapter.c dbAdapter.h gcc -c dbAdapter.c The key thing here is that the Makefile looks … Read more

What is “object” in “object file” and why is it called this way? [duplicate]

Object files (or object code) are machine code files generated by a compiler from source code. The difference with an executable is that the object file isn’t linked, so references to functions, symbols, etc aren’t defined yet (their memory addresses is basically left blank). When you compile a C file with GCC: gcc -Wall -o … Read more

tech