cmake:您在没有任何源文件的情况下调用了库 cryptopp 的ADD_LIBRARY
cmake: You have called ADD_LIBRARY for library cryptopp without any source files
Windows 64bit 使用 cmake 编译 c++ 项目: github.com/iHateInventNames/synergy-through-usb
我在这篇文章中修复了一个上一个问题:编译问题:在 Windows 上使用 cmake 项目LIBUSB_1
因此,当我现在点击cmake时,出现以下错误:
> cmake .
-- Found libusb-1.0:
-- - Includes: C:/local/libs/libusbx
-- - Libraries: C:/local/libs/libusbx/libusb-1.0.lib
You have called ADD_LIBRARY for library cryptopp without any source files. This typically indicates a problem with your CMakeLists.txt file
-- Configuring done
CMake Error: CMake can not determine linker language for target: cryptopp
CMake Error: CMake can not determine linker language for target: cryptopp
CMake Error: CMake can not determine linker language for target: cryptopp
CMake Error: CMake can not determine linker language for target: cryptopp
-- Generating done
-- Build files have been written to: C:/local/projects/synergy-usb/synergy-through-usb-master
这是什么意思? 我该如何解决/继续前进?
指向安装说明的链接
两个转到 404 错误...
- http://synergy-project.org/projects/synergy/wiki/Readme/?hl=pm
- http://synergy-project.org/projects/synergy/wiki/Compiling/?hl=pm
根据快速浏览项目的 CMakeLists,似乎您应该在运行 CMake 之前tools/cryptopp562.zip
解压缩到名为 tools/cryptopp562
的目录中。如果有的话,这绝对应该在项目的安装说明中提到。
更准确地说,文件tools/CMakeLists.txt
包含以下代码:
set(cpp_dir cryptopp562)
file(GLOB cpp_src ${cpp_dir}/*.cpp)
# ...
add_library(cryptopp STATIC ${cpp_src})
这意味着变量cpp_src
填充了从目录cryptopp562
获取的源文件(相对于 CMakeList 的目录,即 tools
),然后用于定义库cryptopp
的源文件。但是,该项目的分发仅包含tools/cryptopp562.zip
。将其解压缩到目录中tools/cryptopp562
应该提供丢失的文件。
相关文章:
- 什么时候调用组成单元对象的析构函数
- 对RValue对象调用的LValue ref限定成员函数
- 为什么使用 "this" 指针调用派生成员函数?
- 函数调用中参数的顺序重要吗
- OpenGL - 在抛出"__gnu_cxx::recursive_init_error"实例后终止调用?
- 基于另一个成员参数将函数调用从类传递给它的一个成员
- 为什么我的C#代码在调用回C++COM直到Task时会暂停.等待/线程.加入
- 在c++类上调用void函数
- 为什么 std::unique 不调用 std::sort?
- 调用专用模板时出错"no matching function for call to [...]"
- 选择要调用的构造函数
- C++为什么尽管我调用了void函数,它却不起作用
- 构造函数正在调用一个使用当前类类型的函数
- 变量没有改变?通过向量的函数调用
- 没有为自己的结构调用列表推回方法
- 调用'begin(int [n])'没有匹配函数
- 什么时候调用析构函数
- 如何用参数值调用函数(仅在运行时已知)
- std::cout.imbue()多重调用
- cmake:您在没有任何源文件的情况下调用了库 cryptopp 的ADD_LIBRARY