473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

About LNK2001 in VC++ 2003

Dear Sirs plz Help me

I'm Trying compile in C++ .NET 2003 (VS 2003 Enterprise Arcitech)
This Code (From MSDN) And Gives LNK2001 Linker Error
When i remove "new" operator form constructor all works fine
plz help me what happand and how slove this problem
This code has no problem in vc++2002

class CppClass
{
public:
// constructor
CppClass() {}
// destructor
~CppClass() {}
// methods
void native_f() {}
};

__gc class MClass
{
public:
// constructor
MClass() { m_pC = new CppClass(); }
// destructor
~MClass() { delete m_pC; }
// method
void managed_f() { m_pC->native_f(); }
private:
CppClass __nogc * m_pC;
};

Nov 16 '05 #1
1 1594

--------------------
From: "Irakli Lomidze" <sk****@access.sanet.ge>
Subject: About LNK2001 in VC++ 2003

Dear Sirs plz Help me

I'm Trying compile in C++ .NET 2003 (VS 2003 Enterprise Arcitech)
This Code (From MSDN) And Gives LNK2001 Linker Error
When i remove "new" operator form constructor all works fine
plz help me what happand and how slove this problem
This code has no problem in vc++2002


I tried the code provided and did not encounter any problems, could you
provide your usage scenario or other information that might indicate what
the error is. I used a MC++ console application for my project.

Pranish Kumar, 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bil Muh | last post by:
Hello Developers, I use VC++ .NET v2003. By using Windows Forms .NET, I am developing an application which will work with TCP/IP functions. I can Build my application in Debug Mode normally, but,...
3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
0
by: Robert A Riedel | last post by:
In a module DATA.CPP, when attempting to initialize a __gc array as follows: // // Begin sample ... // // // Yes, I include all of the correct assemblies, including MSCORLIB.DLL and all of...
0
by: Detlef Grittner | last post by:
I created a WinForm App with the wizard for VC++ in VS.net 2003. Then I tried to use a traditional C++ class in this project, i.e. one that has a .h and a .cpp file. I've put a __gc in front of...
0
by: 42601551 | last post by:
in Jeff Partch's thread http://groups.google.com/group/microsoft.public.vc.language/browse_thread/thread/b9468ebbf7927da8/a901653d04ad774a%23a901653d04ad774a?sa=X&oi=groupsr&start=1&num=3 says a...
6
by: walkerfx | last post by:
Hi Everyone, I have been trying resolve this issue for many hours and am not making any progress. I have a DLL that I'm updating with some new 3rd party libraries. However, there appears to be a...
6
by: sadegh | last post by:
Hi I have a problem with my program in VC++6 When I compile it, the following errors are listed. I spend a lot of time on the groups.google.com to find its reason, but none of comments could...
5
by: bonnielym84 | last post by:
Im new here..didnt noe whether is this the rite way to post my problem..Really need help here..i've been stucked in this error from last wk..My problem is like this..Im using VC++ 6.0 to compile my C...
0
by: bonnielym84 | last post by:
Im new here and im not sure whether is this the right place for me to post my question..anyway..hope that you can help me..i have been stucked in this problem since last wk..My problem is..I'm using...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.