Answer the question
In order to leave comments, you need to log in
How to build static libraries from source?
Hello!
Please tell me how to compile lib files
The book told me that it is best to compile the sources on the machine where I am going to program, but I have never done this, much less compile someone else's code into an unknown file type
Answer the question
In order to leave comments, you need to log in
For many programming languages, build systems come with compilers and are the de facto standard for the respective language.
There is no de facto build standard for C/C++, but there are several build systems that are commonly used:
make is a very simple utility, but inconvenient for large projects.
Can be identified by the presence of a Makefile. Sometimes this file is generated by the configure script.
If there is a Makefile, run:
Delete generated files (to start the build again):
cmake - a higher-level build system that generates projects for the IDE or the same Makefile.
Can be determined by the presence of CMakeLists.txt
mkdir cmake-build
# Создаём папку для сгенерированных файлов, чтобы не смешивались с исходниками
# Это называеться out-of-source build
cd cmake-build
# Генерируем проект или Makefile
cmake ..
# Запускаем билд, можно просто запустить make
cmake --build .
qmake
make
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question