Hi
I’m trying to compile the SDK, but the process is only successful up to a point… I’m using GCC/G++ 4.2. As far as I know I’ve installed the toolkit and sdc successfully. I’ve also exported the relevant paths to the $PATH and $LD_LIBRARY variables.
If anyone could shed any light onto this particular error, I’d be most grateful.
Cheers
Luke
These are the final lines of output from make:
make -C src/dwtHaar1D/
make[1]: Entering directory /home/luke/NVIDIA_GPU_Computing_SDK/C/src/dwtHaar1D' make[1]: Leaving directory
/home/luke/NVIDIA_GPU_Computing_SDK/C/src/dwtHaar1D’
make -C src/nbody/
make[1]: Entering directory /home/luke/NVIDIA_GPU_Computing_SDK/C/src/nbody' In file included from nbody.cpp:37: bodysystemcuda.h:35: error: ‘getArray’ declared as a ‘virtual’ field bodysystemcuda.h:35: error: expected ‘;’ before ‘(’ token bodysystemcuda.h:36: error: ‘BodyArray’ has not been declared In file included from bodysystemcuda.h:73, from nbody.cpp:37: bodysystemcuda_impl.h: In constructor ‘BodySystemCUDA<T>::BodySystemCUDA(int, bool)’: bodysystemcuda_impl.h:68: error: class ‘BodySystemCUDA<T>’ does not have any field named ‘BodySystem’ bodysystemcuda_impl.h: In constructor ‘BodySystemCUDA<T>::BodySystemCUDA(int, unsigned int, unsigned int, bool, bool)’: bodysystemcuda_impl.h:88: error: class ‘BodySystemCUDA<T>’ does not have any field named ‘BodySystem’ bodysystemcuda_impl.h: In destructor ‘virtual BodySystemCUDA<T>::~BodySystemCUDA()’: bodysystemcuda_impl.h:110: error: ‘m_numBodies’ was not declared in this scope bodysystemcuda_impl.h: In member function ‘virtual void BodySystemCUDA<T>::_initialize(int)’: bodysystemcuda_impl.h:116: error: ‘m_bInitialized’ was not declared in this scope bodysystemcuda_impl.h:118: error: ‘m_numBodies’ was not declared in this scope bodysystemcuda_impl.h: In member function ‘virtual void BodySystemCUDA<T>::_finalize()’: bodysystemcuda_impl.h:180: error: ‘m_bInitialized’ was not declared in this scope bodysystemcuda_impl.h: In member function ‘virtual void BodySystemCUDA<T>::update(float)’: bodysystemcuda_impl.h:227: error: ‘m_bInitialized’ was not declared in this scope bodysystemcuda_impl.h:233: error: ‘m_numBodies’ was not declared in this scope bodysystemcuda_impl.h:239: error: ‘m_numBodies’ was not declared in this scope bodysystemcuda_impl.h: At global scope: bodysystemcuda_impl.h:246: error: ‘T* BodySystemCUDA<T>::getArray’ is not a static member of ‘class BodySystemCUDA<T>’ bodysystemcuda_impl.h:246: error: template definition of non-template ‘T* BodySystemCUDA<T>::getArray’ bodysystemcuda_impl.h:246: error: ‘BodyArray’ was not declared in this scope bodysystemcuda_impl.h:247: error: expected
;’ before ‘{’ token
bodysystemcuda_impl.h:278: error: variable or field ‘setArray’ declared void
bodysystemcuda_impl.h:278: error: ‘BodyArray’ was not declared in this scope
bodysystemcuda_impl.h:278: error: expected primary-expression before ‘const’
In file included from nbody.cpp:38:
bodysystemcpu.h:34: error: ‘getArray’ declared as a ‘virtual’ field
bodysystemcpu.h:34: error: expected ‘;’ before ‘(’ token
bodysystemcpu.h:35: error: ‘BodyArray’ has not been declared
In file included from bodysystemcpu.h:60,
from nbody.cpp:38:
bodysystemcpu_impl.h: In constructor ‘BodySystemCPU::BodySystemCPU(int)’:
bodysystemcpu_impl.h:28: error: class ‘BodySystemCPU’ does not have any field named ‘BodySystem’
bodysystemcpu_impl.h: In destructor ‘virtual BodySystemCPU::~BodySystemCPU()’:
bodysystemcpu_impl.h:45: error: ‘m_numBodies’ was not declared in this scope
bodysystemcpu_impl.h: In member function ‘virtual void BodySystemCPU::_initialize(int)’:
bodysystemcpu_impl.h:51: error: ‘m_bInitialized’ was not declared in this scope
bodysystemcpu_impl.h:53: error: ‘m_numBodies’ was not declared in this scope
bodysystemcpu_impl.h: In member function ‘virtual void BodySystemCPU::_finalize()’:
bodysystemcpu_impl.h:73: error: ‘m_bInitialized’ was not declared in this scope
bodysystemcpu_impl.h: In member function ‘virtual void BodySystemCPU::update(float)’:
bodysystemcpu_impl.h:85: error: ‘m_bInitialized’ was not declared in this scope
bodysystemcpu_impl.h: At global scope:
bodysystemcpu_impl.h:93: error: ‘T* BodySystemCPU::getArray’ is not a static member of ‘class BodySystemCPU’
bodysystemcpu_impl.h:93: error: template definition of non-template ‘T* BodySystemCPU::getArray’
bodysystemcpu_impl.h:93: error: ‘BodyArray’ was not declared in this scope
bodysystemcpu_impl.h:94: error: expected ;' before ‘{’ token bodysystemcpu_impl.h:113: error: variable or field ‘setArray’ declared void bodysystemcpu_impl.h:113: error: ‘BodyArray’ was not declared in this scope bodysystemcpu_impl.h:113: error: expected primary-expression before ‘const’ bodysystemcpu_impl.h: In member function ‘void BodySystemCPU<T>::_computeNBodyGravitation()’: bodysystemcpu_impl.h:164: error: ‘m_numBodies’ was not declared in this scope bodysystemcpu_impl.h: In member function ‘void BodySystemCPU<T>::_integrateNBodySystem(float)’: bodysystemcpu_impl.h:186: error: ‘m_numBodies’ was not declared in this scope nbody.cpp: In member function ‘void NBodyDemo<T>::_runBenchmark(int)’: nbody.cpp:334: error: there are no arguments to ‘computePerfStats’ that depend on a template parameter, so a declaration of ‘computePerfStats’ must be available nbody.cpp:334: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) nbody.cpp: At global scope: nbody.cpp:347: error: too few template-parameter-lists nbody.cpp:348: error: too few template-parameter-lists nbody.cpp: In function ‘void initGL()’: nbody.cpp:379: warning: deprecated conversion from string constant to ‘char*’ nbody.cpp: In member function ‘void NBodyDemo<T>::_init(int, int, int, bool, bool) [with T = double]’: nbody.cpp:136: instantiated from ‘static void NBodyDemo<T>::init(int, int, int, bool, bool) [with T = double]’ nbody.cpp:852: instantiated from here nbody.cpp:236: error: cannot allocate an object of abstract type ‘BodySystemCUDA<double>’ bodysystemcuda.h:24: note: because the following virtual functions are pure within ‘BodySystemCUDA<double>’: bodysystem.h:46: note: T* BodySystem<T>::getArray(BodySystem<T>::BodyArray) [with T = double] bodysystem.h:47: note: void BodySystem<T>::setArray(BodySystem<T>::BodyArray, const T*) [with T = double] nbody.cpp: In member function ‘void NBodyDemo<T>::_compareResults(int) [with T = double]’: nbody.cpp:151: instantiated from ‘static void NBodyDemo<T>::compareResults(int) [with T = double]’ nbody.cpp:863: instantiated from here nbody.cpp:291: error: cannot allocate an object of abstract type ‘BodySystemCPU<double>’ bodysystemcpu.h:24: note: because the following virtual functions are pure within ‘BodySystemCPU<double>’: bodysystem.h:46: note: T* BodySystem<T>::getArray(BodySystem<T>::BodyArray) [with T = double] bodysystem.h:47: note: void BodySystem<T>::setArray(BodySystem<T>::BodyArray, const T*) [with T = double] nbody.cpp: In member function ‘void NBodyDemo<T>::_init(int, int, int, bool, bool) [with T = float]’: nbody.cpp:136: instantiated from ‘static void NBodyDemo<T>::init(int, int, int, bool, bool) [with T = float]’ nbody.cpp:883: instantiated from here nbody.cpp:236: error: cannot allocate an object of abstract type ‘BodySystemCUDA<float>’ bodysystemcuda.h:24: note: because the following virtual functions are pure within ‘BodySystemCUDA<float>’: bodysystem.h:46: note: T* BodySystem<T>::getArray(BodySystem<T>::BodyArray) [with T = float] bodysystem.h:47: note: void BodySystem<T>::setArray(BodySystem<T>::BodyArray, const T*) [with T = float] nbody.cpp: In member function ‘void NBodyDemo<T>::_compareResults(int) [with T = float]’: nbody.cpp:151: instantiated from ‘static void NBodyDemo<T>::compareResults(int) [with T = float]’ nbody.cpp:894: instantiated from here nbody.cpp:291: error: cannot allocate an object of abstract type ‘BodySystemCPU<float>’ bodysystemcpu.h:24: note: because the following virtual functions are pure within ‘BodySystemCPU<float>’: bodysystem.h:46: note: T* BodySystem<T>::getArray(BodySystem<T>::BodyArray) [with T = float] bodysystem.h:47: note: void BodySystem<T>::setArray(BodySystem<T>::BodyArray, const T*) [with T = float] make[1]: *** [obj/x86_64/release/nbody.cpp.o] Error 1 make[1]: Leaving directory
/home/luke/NVIDIA_GPU_Computing_SDK/C/src/nbody’
make: *** [src/nbody/Makefile.ph_build] Error 2