linker error with 'new'

  • Thread starter Thread starter Ffelagund
  • Start date Start date
F

Ffelagund

Hello i'm trying to compile a simple C++ managed class library (dll) but
the projet that the wizard creates doesn't compile. The linker gives me
this error:
"ShaderDesignerSDK error LNK2001: extern symbol "void * __cdecl operator
new(unsigned int)" (??2@$$FYAPAXI@Z) unresolved"

I don't know how fix this. Can anybody help me?
Thank you very much
 
It looks like you're not calling the constructor of the class with the right
type of parameter.
 
Gabriele said:
It looks like you're not calling the constructor of the class with the right
type of parameter.
The line with the new is this data->primaryPointer = new unsigned
char[128*128];, it's a basic type, so the constructor doesn't need any
parameter :/
 
Ffelagund said:
Gabriele said:
It looks like you're not calling the constructor of the class with the
right
type of parameter.
The line with the new is this data->primaryPointer = new unsigned
char[128*128];, it's a basic type, so the constructor doesn't need any
parameter :/

Solved, i must use this line data->primaryPointer = new unsigned char
__gc[128*128]
 
Back
Top