Problems with C++ libraries

Hi,

when compiling my test-programm with nvcc, I get the following error message

run command: nvcc --host-compilation=c++ -deviceemu -run cuda_test.cu,

error message:

[code]

/usr/include/c++/4.3/bits/ios_base.h:409: Fehler: Deklaration von »typedef class std::streampos std::ios_base::streampos«

/usr/include/c++/4.3/bits/postypes.h:207: Fehler: verändert die Bedeutung von »streampos« von »typedef class std::fpos<__mbstate_t> std::streampos«

/usr/include/c++/4.3/bits/ios_base.h:410: Fehler: Deklaration von »typedef std::streamoff std::ios_base::streamoff«

/usr/include/c++/4.3/bits/postypes.h:71: Fehler: verändert die Bedeutung von »streamoff« von »typedef int64_t std::streamoff«

/usr/include/c++/4.3/streambuf:147: Anmerkung: (wenn das nicht beabsichtigt war, sollte sicher gestellt werden, dass das Funktions-Template bereits deklariert wurde, und <> hier hinter Funktionsnamen eingefügt wurde)

[\code]

my test-program:

#include

#include <stdio.h>

#define N 16

global void vecAdd(float* A, float* B, float* C)

{

int i = threadIdx.x;

C[i] =3;// A[i] + B[i];

}

int main()

{

float* a,*b,*c;

float d=3;

float e=3;

a=&d;

b=&e;

c=(float*)malloc(16*sizeof(float));

// Kernel invocation

vecAdd<<<1, N>>>(a,b,c);

//std::cout<<c[0]<<std::endl;

printf("%d",(int)c[1]);

}

I installed a Toolkit 2.1. (but no cuda driver, because my OS isn’t supported by CUDA).

I’m running Kubuntu 9.04 with a gcc 4.3.3 compiler

compiling and running with nvcc works fine with c-code.

Does anybody know what the problem is?

Another thread in this forum (http://forums.nvidia.com/index.php?showtopic=98453&st=0&p=549336&#entry549336) is about compiling with the toolkit 2.2., but I actually have 2.1 installed, which is said to work fine on kubuntu 9.04

Thanks in advance.

Have you try to compile an example c++ code to see if the compiler is working well?

I forgot to ask if you did a downgrade on the compiler.