简体   繁体   中英

Building cuda and boost library with Makefile

I have a 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 contains #include <boost/lambda/lambda.hpp> and when I'm trying to build it with nmake it tells me "Cannot open include file: 'boost/lambda/lambda.hpp'"

What should I do here? How to tell nvcc where to take this include files from?

Use the -I flag. Eg -I/opt/cuda-toolkit/include

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM