Home > Back-end >  Directory more how to write CMakeLists. TXT to achieve static libraries, and compile executable file
Directory more how to write CMakeLists. TXT to achieve static libraries, and compile executable file

Time:03-02

Directory and the directory hierarchy CMakeLists. TXT content is as follows:


Compile command:
 
The mkdir build
CD build
Cmake.. - G "MinGW Makefiles" - DCMAKE_C_COMPILER=GCC - DCMAKE_CXX_COMPILER=G + + - DCMAKE_MAKE_PROGRAM=make
The make -f Makefile


Results:


After I have a separate compilation, is to compile a good util static library, then compile the test program, will still be submitted to the undefined reference errors,

The couple consult!!!!! This is where the problem??
  • Related