无法在OS X下编译CUDA驱动程序API示例
Can't compile CUDA driver api sample under OS X
我正在尝试编译使用 nvidia cuda 驱动程序 API 的代码,但编译返回以下错误:
g++ -fPIC -o exec helloWorldDriverAPI.cpp.o -lcuda
ld: library not found for -lcuda
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [exec] Error 1
这是我遇到问题的示例代码:https://github.com/mciancia/CUDA-Driver-api
我尝试手动指向库文件夹,但它对我不起作用。
另外,我在 Linux 下编译此代码没有任何问题。我在OS x 750和最新驱动程序(6.5)下使用带有nvidia 10.10m的Macbook
这在其他地方得到了回答,复制了这里的答案以将其从未回答列表中删除:
您需要添加库的位置。生成文件中的LIB_CUDA变量应为:
LIB_CUDA := -L/usr/local/cuda/lib -lcuda
相关文章:
- Mongodb c++驱动程序:如何查询元素的数组
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 使用mongocxx驱动程序时包含头文件问题
- void*到驱动程序中的UnicodeString
- C++驱动程序看不到头文件
- 用于创建/注册虚拟存储设备的 IOKit 驱动程序
- 员工测试驱动程序数据结构
- 获取 OID(类型::b_oid)作为 MongoDB C++驱动程序中的字符串
- 如何在 c++ 中映射驱动程序?
- 如何在 cuda 中将 kd 树从主机复制到驱动程序
- Cuda 基本程序 (将值写入矩阵和 std:cout 不起作用) ;主功能不启动
- Visual Studio 如何在内核模式驱动程序项目中使用C++标准库?
- 为什么我的驱动程序只读取部分字符串?
- 我可以在 Linux CentOS 6 中安装没有驱动程序的 CUDA 吗(只有 cuda 工具包)
- CUDA TCC 驱动程序是否适用于 Windows 上的 geforce 卡
- 无法在OS X下编译CUDA驱动程序API示例
- 奇怪的CUDA内核在旧的显示驱动程序上的结果
- 简单的CUDA应用程序,cudaMalloc以错误结束:未指定的驱动程序错误
- 在ubuntu上运行cuda -它是否需要一个本地设备驱动程序(使用nvidia显卡)
- CUDA程序崩溃驱动程序