External call to __cxa_vec_ctor? What is this?

Consider the following code:

class MyClass {

public:

	int val1;

	__device__ inline MyClass() {}

};

__global__ void func() {

	MyClass var[2];

}

When trying to compile it with nvcc (CUDA 2.3) I get the following error:

any idea of what may be the cause of it? Am I missing some special constructor for arrays or what?

I had similar problems some time ago. My guess is, that this is some form of a compiler bug. You could probably compile with --keep and dig through the created files and check what is missing.

I haven’t look that deep into the problem, as macro with some if statements was ok for me. You could also try some form of template meta-programming list, but I ran into some problems with compiling it.

BTW: The problem is in CUDA 3.0 beta as well.

-Jens

Edit: You can also remove all constructors from your classes, but this is probably not what you are looking for.

In CUDA 3.3 same problem. Why CUDA does not support classess and C++ yet? It causes many difficulties, for example, with complex numbers.
It is impossible to redefine operator.