G
Guest
My hear is dropping out of these linker errors of VC++ .NET. :-(
I try to create a mixed managed/unmanaged .NET dll to be used for my futur
projects, but I always bump in a linker error and no way to get around
this...
The error is: sLibBase error LNK2005: "void __cdecl operator delete(void *)"
(??3@YAXPAX@Z) already defined in libcmtd.lib(dbgdel.obj)
These are 2 the same header files. The first uses <string> and generates the
link error.
If I remove this <string> then the linker does not get an error.
It is not only <string > the gives this error, also includes with <istream>
and <ostream>,... and my code uses <string> dramatically.
Any idea how to fix this? I found references to this problem on msdn, but
that is for VC 6 and the sollutions suggested doesn't solve this error.
Any help would be great.
This generates the link error
----------------------------------------------
#pragma once
using namespace System;
#include <afx.h>
#include <string>
namespace sLibBase
{
public __gc class Class1
{
};
}
This generates no link error
----------------------------------------------
#pragma once
using namespace System;
#include <afx.h>
namespace sLibBase
{
public __gc class Class1
{
};
}
I try to create a mixed managed/unmanaged .NET dll to be used for my futur
projects, but I always bump in a linker error and no way to get around
this...
The error is: sLibBase error LNK2005: "void __cdecl operator delete(void *)"
(??3@YAXPAX@Z) already defined in libcmtd.lib(dbgdel.obj)
These are 2 the same header files. The first uses <string> and generates the
link error.
If I remove this <string> then the linker does not get an error.
It is not only <string > the gives this error, also includes with <istream>
and <ostream>,... and my code uses <string> dramatically.
Any idea how to fix this? I found references to this problem on msdn, but
that is for VC 6 and the sollutions suggested doesn't solve this error.
Any help would be great.
This generates the link error
----------------------------------------------
#pragma once
using namespace System;
#include <afx.h>
#include <string>
namespace sLibBase
{
public __gc class Class1
{
};
}
This generates no link error
----------------------------------------------
#pragma once
using namespace System;
#include <afx.h>
namespace sLibBase
{
public __gc class Class1
{
};
}