G
gauss
Hi,
I am using VS2003.NET. When /clr option is activated, /MT(d) is
automatically chosen (just as said in the doc). Can I changed that to
/MD(d)? Knowing that in VS2005 /MD is chosen by default. And not forgetting
the non-deterministic Mixed DLL problem under VS2003.Net
The situation is the following: I have a native dll, a mixed dll and a .Net
application. The mixed dll interfaces the native dll for .Net (common
senario). One of the methods of a native class returns 2 std::vector 's in
its parameters list which are resized in native code. So the mixed dll has
to declare 2 vectors (with default ctor), send them to the native function
and read back the reuslts in .net arrays.
That worked fine untill I used a different type of vectors (not STL). The
difference I found is that the default ctor of stl vectors in VC7.1 doesn't
allocate memory (doesn't call new) if initiale size is zero (that's good).
But the other type of vectors does that. And when delete is called in the
native code after resizing the vector... Boom!!! _CrtIsValidHeapPointer
Assertion.
I have to say that the native dll is compiled with /MD and the the mixed dll
is compiled with /MT!!!! So that's it. But I can't compile the native dll
with /MT. And in the first place common heap managment requires /MD
compilation (I think).
So the question (once again) can I compile mixed dll with /MD?
Thanks,
GY
I am using VS2003.NET. When /clr option is activated, /MT(d) is
automatically chosen (just as said in the doc). Can I changed that to
/MD(d)? Knowing that in VS2005 /MD is chosen by default. And not forgetting
the non-deterministic Mixed DLL problem under VS2003.Net
The situation is the following: I have a native dll, a mixed dll and a .Net
application. The mixed dll interfaces the native dll for .Net (common
senario). One of the methods of a native class returns 2 std::vector 's in
its parameters list which are resized in native code. So the mixed dll has
to declare 2 vectors (with default ctor), send them to the native function
and read back the reuslts in .net arrays.
That worked fine untill I used a different type of vectors (not STL). The
difference I found is that the default ctor of stl vectors in VC7.1 doesn't
allocate memory (doesn't call new) if initiale size is zero (that's good).
But the other type of vectors does that. And when delete is called in the
native code after resizing the vector... Boom!!! _CrtIsValidHeapPointer
Assertion.
I have to say that the native dll is compiled with /MD and the the mixed dll
is compiled with /MT!!!! So that's it. But I can't compile the native dll
with /MT. And in the first place common heap managment requires /MD
compilation (I think).
So the question (once again) can I compile mixed dll with /MD?
Thanks,
GY