baisa
1
I’ve just installed the cuda toolkit and sdk on linux, and started compiling the examples. It choked at this point:
g++ -m32 -W -Wall -Wimplicit -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wmultichar -Wtrigraphs -Wpointer-arith -Wcast-align -Wreturn-type -Wno-unused-function -I. -I/usr/local/cuda/include -I../../common/inc -DUNIX -O3 -o ../../bin/obj/release/matrixmul_drv.cpp_o -c matrixmul_drv.cpp
matrixmul_drv.cpp: In function ‘CUresult initCUDA(char*, CUfunc_st**)’:
matrixmul_drv.cpp:207: error: jump to label ‘Error’
matrixmul_drv.cpp:191: error: from here
matrixmul_drv.cpp:193: error: crosses initialization of ‘char* module_path’
matrixmul_drv.cpp:207: error: jump to label ‘Error’
matrixmul_drv.cpp:187: error: from here
matrixmul_drv.cpp:193: error: crosses initialization of ‘char* module_path’
matrixmul_drv.cpp:207: error: jump to label ‘Error’
matrixmul_drv.cpp:184: error: from here
matrixmul_drv.cpp:193: error: crosses initialization of ‘char* module_path’
This looks like invalid code! you aren’t allowed to jump across variables – anyone know what is up with this?
Thanks!
javier1
2
Which version of G++ are you running? You should try with g++ 3.4, I had a similar problem with my g++ 4.1 and it disappeared with g+±3.4.