【问题标题】:Building cuda and boost library with Makefile使用 Makefile 构建 cuda 和 boost 库
【发布时间】:2013-03-05 23:48:34
【问题描述】:

我有一个makefile

projectx: component1.obj \         
nvcc -O3 -arch=sm_20 -lcuda -o projectx component2.obj

component1.obj : component1.cu component1.h 
    nvcc -O3 -arch=sm_20 -c component1.cu
component2.obj : component2.cu cm.h component2.h
nvcc -O3 -arch=sm_20 -c component2.cu

component1.cu 包含#include <boost/lambda/lambda.hpp> 当我尝试使用nmake 构建它时,它告诉我“无法打开包含文件:'boost/lambda/lambda.hpp'”

我应该在这里做什么?如何告诉nvcc 从哪里获取此包含文件?

【问题讨论】:

    标签: c++ boost cuda makefile nvcc


    【解决方案1】:

    使用-I 标志。例如。 -I/opt/cuda-toolkit/include

    【讨论】:

    • 我的 boost 库完整路径是:C:\Program Files\boost\boost_1_53_0 请告诉我我应该在 Makefile 中具体做什么?
    • 我尝试添加 BOOST_PATH=C:\Program Files\boost\boost_1_53_0 以及 component1.obj -I $(BOOST_PATH) 在哪里,但 nvcc 不知道如何处理它。跨度>
    【解决方案2】:

    通过将boost 'include' 文件放入C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ 解决

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-06
      • 2015-08-18
      • 2017-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多