By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,325 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,325 IT Pros & Developers. It's quick & easy.

unresloved external when using struct and new operator

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

--------------------
From: "Henke" <he********@hotmail.com>
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: <Oz**************@TK2MSFTNGP11.phx.gbl>
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!TK2MSFTN GP11.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?
<code removed>
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/de...us/dv_vstechar
t/html/vcconMixedDLLLoadingProblem.asp
http://support.microsoft.com/?id=814472

--
Arjun Bijanki, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.