unresloved external when using struct and new operator

  • Thread starter Thread starter Henke
  • Start date Start date
H

Henke

I get a unresolved external error when linking this code. Does anybody know
why?

..h-file
namespace TestDll
{
__gc class Class1
{
public:
Class1();
};
}

..cpp-file
namespace TestDll
{
__nogc struct MyStruct
{
int i;
double j;
};

Class1::Class1()
{
MyStruct *pStruct = __nogc new MyStruct();
}
}

Thanks in advance

/Henke
 
--------------------
From: "Henke" <[email protected]>
Subject: unresloved external when using struct and new operator
Date: Fri, 17 Oct 2003 11:27:38 +0200
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.languages.vc
NNTP-Posting-Host: 62-20-34-22.customer.telia.com 62.20.34.22
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vc:29514
X-Tomcat-NG: microsoft.public.dotnet.languages.vc

I get a unresolved external error when linking this code. Does anybody know
why?
Thanks in advance

/Henke

I assume you're building a .Net Class Library with VS .Net 2003. The
reason for the unresolved external is that your project is not being linked
with the CRT. For more information on why this is the case and how to link
to the CRT, please see the following articles:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar
t/html/vcconMixedDLLLoadingProblem.asp
http://support.microsoft.com/?id=814472
 
Back
Top