Hi guys
I was trying to run the NVIDIA CUDA SDK sample codes…when I do make in the installation directory…I get the following error
[secrj@tesla1 NVIDIA_CUDA_SDK]$ make
make[1]: Entering directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
In file included from src/cmd_arg_reader.cpp:34:
./…/common/inc/cmd_arg_reader.h: In member function ‘const T* CmdArgReader::getArgHelper(const std::string&)’:
./…/common/inc/cmd_arg_reader.h:416: error: must #include before using typeid
./…/common/inc/cmd_arg_reader.h:432: error: must #include before using typeid
src/cmd_arg_reader.cpp: In destructor ‘CmdArgReader::~CmdArgReader()’:
src/cmd_arg_reader.cpp:101: error: must #include before using typeid
src/cmd_arg_reader.cpp:106: error: must #include before using typeid
src/cmd_arg_reader.cpp:111: error: must #include before using typeid
src/cmd_arg_reader.cpp:116: error: must #include before using typeid
src/cmd_arg_reader.cpp:121: error: must #include before using typeid
make[1]: *** [obj/release/cmd_arg_reader.cpp_o] Error 1
make[1]: Leaving directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
make: *** [lib/libcutil.so] Error 2
I tried by placing the #include line in src/cmd_arg_reader.cpp file …
when I do make…the output is
[secrj@tesla1 NVIDIA_CUDA_SDK]$ make
make[1]: Entering directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
make[1]: Warning: File `src/cmd_arg_reader.cpp’ has modification time 98 s in the future
In file included from src/cmd_arg_reader.cpp:34:
./…/common/inc/cmd_arg_reader.h: In member function ‘const T* CmdArgReader::getArgHelper(const std::string&)’:
./…/common/inc/cmd_arg_reader.h:416: error: must #include before using typeid
./…/common/inc/cmd_arg_reader.h:432: error: must #include before using typeid
make[1]: *** [obj/release/cmd_arg_reader.cpp_o] Error 1
make[1]: Leaving directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
make: *** [lib/libcutil.so] Error 2
then inserted the line #include in the file common/inc/cmd_arg_reader.h…
then make cmd…gives the output
[secrj@tesla1 NVIDIA_CUDA_SDK]$ make
make[1]: Entering directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
In file included from ./…/common/inc/stopwatch.h:37,
from src/cutil.cpp:52:
./…/common/inc/stopwatch_base.h:74: warning: type qualifiers ignored on function return type
./…/common/inc/stopwatch_base.h:78: warning: type qualifiers ignored on function return type
In file included from ./…/common/inc/stopwatch_base.h:91,
from ./../common/inc/stopwatch.h:37,
from src/cutil.cpp:52:
./…/common/inc/stopwatch_base.inl:85: warning: type qualifiers ignored on function return type
./…/common/inc/stopwatch_base.inl:96: warning: type qualifiers ignored on function return type
In file included from ./…/common/inc/stopwatch.h:44,
from src/cutil.cpp:52:
./…/common/inc/stopwatch_linux.h:64: warning: type qualifiers ignored on function return type
./…/common/inc/stopwatch_linux.h:68: warning: type qualifiers ignored on function return type
./…/common/inc/stopwatch_linux.h:144: warning: type qualifiers ignored on function return type
./…/common/inc/stopwatch_linux.h:161: warning: type qualifiers ignored on function return type
In file included from src/cutil.cpp:52:
./…/common/inc/stopwatch.h:53: warning: type qualifiers ignored on function return type
In file included from src/cutil.cpp:53:
./…/common/inc/bank_checker.h:52: warning: type qualifiers ignored on function return type
./…/common/inc/bank_checker.h:238: warning: type qualifiers ignored on function return type
src/cutil.cpp: In function ‘CUTBoolean::loadPPM(const char*, unsigned char**, unsigned int*, unsigned int*, unsigned int*)’:
src/cutil.cpp:179: error: ‘strncmp’ was not declared in this scope
src/cutil.cpp: In function ‘char* cutFindFilePath(const char*, const char*)’:
src/cutil.cpp:572: error: ‘strlen’ was not declared in this scope
src/cutil.cpp:577: error: ‘strcpy’ was not declared in this scope
src/cutil.cpp:578: error: ‘strcat’ was not declared in this scope
src/cutil.cpp:604: error: ‘strncpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean cutGetCmdLineArgumentstr(int, const char**, const char*, char**)’:
src/cutil.cpp:1165: error: ‘strcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = float]’:
src/cutil.cpp:640: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = double]’:
src/cutil.cpp:654: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = int]’:
src/cutil.cpp:668: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = unsigned int]’:
src/cutil.cpp:682: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = char]’:
src/cutil.cpp:697: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
src/cutil.cpp: In function ‘CUTBoolean::cutReadFile(const char*, T**, unsigned int*, bool) [with T = unsigned char]’:
src/cutil.cpp:711: instantiated from here
src/cutil.cpp:492: error: ‘memcpy’ was not declared in this scope
make[1]: *** [obj/release/cutil.cpp_o] Error 1
make[1]: Leaving directory `/home/proj/08/secrj/cuda/NVIDIA_CUDA_SDK/common’
make: *** [lib/libcutil.so] Error 2
My operating system is Fedora 10 64-bit
gcc version 4.3.2 20081105
NVIDIA Driver 190.18 Beta
CUDA Toolkit 2.3
CUDA SDK 2.3 code samples
Is there any compatibility issue regarding gcc…
Please help me out… I am facing this problem for quite some time…