Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以使用以下命令用 g++ 编译 cpp 文件:
g++ test.cpp -lmpfr -lgmp
如何将这些库添加到 CMakeLists.txt 以使用 CMake 进行编译?
建议您阅读CMake 教程、“添加库(步骤 2)”和target_link_libraries文档。