我正在编译一些CUDA/C,以便在Matlab中作为MEX库运行,并得到以下错误:
Error using mex
/usr/lib/x86_64-linux-gnu/libc_nonshared.a(atexit.oS): In function `atexit':
(.text+0x12): undefined reference to `__cxa_atexit'
collect2: error: ld returned 1 exit status
我假设这意味着我需要链接到其他库中,但是什么呢?
我当前的编译命令是:
mex -L/usr/local/cuda/lib6
我已经设置了我的CMakeLists.txt,这样${CUDA_HOST_COMPILER}就是/usr/local/cuda/bin/gcc (指向/usr/bin/gcc-4.9)。这是它应该是的,并且对我来说工作得很好。直到今天。我运行了一个构建,在中间链接阶段,我得到了:
"/usr/local/cuda/bin/gcc": No such file or directory
CMakeFiles/tester.dir/build.make:2335: recipe for target 'CMakeFiles/wherever/foo_intermediate
我正在使用CMAKE在Windows上编译支持CUDA的OpenCV 3.0.0。当我点击"configure“时,出现如下错误:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
linked by target
在编译带有Multie.h和.cu文件的静态库时,我会得到一个未解析的extern函数。下面是一个复制错误的简短示例。
看来我无法让Nsight Eclipse首先编译extrafunctions.cu。在我的整个项目中,先编译带有额外函数的文件,但仍然会抛出无法解决外部函数错误的文件。
下面是这个示例的输出:
**** Build of configuration Debug for project linkerror ****
make all
Building file: ../cudatest.cu
Invoking: NVCC Compiler
nvcc -I/usr/local
NVCC正在返回一个错误,但是没有什么信息可以继续。在迁移到所谓的“现代cmake”之前,这个项目确实进行了编译。我不再使用findCUDA了。我已经做了多次网络搜索,找不到一个线索来帮助解决这个问题。任何帮助都会很好。谢谢。
[ 3%] Building CUDA object CMakeFiles/foo_cuda.dir/src/foo/gpu/gpu_camera.cu.o
/usr/local/cuda/bin/nvcc -DFOO_DATA_DIR=\"/home/developer/Data\" -DFOO_RESULTS_DIR=\"/home/de
我尝试使用下面的Makefile从编译代码。这是一个GPU燃烧器使用CUDA和我的Mac确实有GT750M。
1 CUDAPATH=/usr/local/cuda
2
3 # Have this point to an old enough gcc (for nvcc)
4 GCCPATH=/usr/bin/clang
5
6 NVCC=nvcc
7 CCPATH=${GCCPATH}/bin
8
9 drv:
10 PATH=${PATH}:.:${CCPATH}:${PATH} ${NVCC} -I${CUDAPATH}/include
我已经在我的ubuntu上安装了cuda 6.5。我的视频卡是GTX泰坦。
当我想要制作一个cuda样本(./模拟/粒子)时,我会得到以下信息:
>>> WARNING - libGLU.so not found, refer to CUDA Samples release notes for how to find and install them. <<<
[@] /usr/local/cuda-6.5/bin/nvcc -ccbin g++ -I../../common/inc -m64 -gencode arch=compute_11,code=sm
我将我的cuda工具包从5.5更新到6.5。然后执行以下命令
nvcc -arch=sm_52
开始给我一个错误
nvcc fatal : Value 'sm_52' is not defined for option 'gpu-architecture'
这是个虫子吗?或者nvcc 6.5不支持Maxwell虚拟体系结构。
我正在尝试使用cuda编译一个使用__m128i的简单程序,但是当我在Linux上使用nvcc (nvcc test.cu -o test)进行编译时,我得到了"__m128i" is a vector, which is not supported in device code。这就是我正在尝试编译的程序
#include <stdio.h>
#include <emmintrin.h>
__global__ void hello(){
printf("%d\n",threadIdx.x);
__m128i x;
}