473,668 Members | 2,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1606

--------------------
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
763
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, whenever I want to Build at Release Mode, compiler gives LNK2001, LNK2019 ve LNK1120 errors. I read the MSDN documents, unfortunately, I could not solve my problem. I am requesting your help. All errors are below with my application name...
3
6070
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 the workspace and then: Build>Batch Build
0
1236
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 // the other .NET related paraphernalia.
0
1045
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 the class, because I want to have it garbage collected. E.g.: ..h:
0
1068
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 way to forward function exported by ordinal. i tried, however the linker reported me with the following: PureGina.exp : error LNK2001: unresolved external symbol _ExpFunc1 PureGina.exp : error LNK2001: unresolved external symbol _ExpFunc10...
6
3208
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 conflict causing the following link errors: ------------ error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??_V@YAXPAX@Z) error LNK2001: unresolved external symbol __ftol2
6
121893
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 not help me. Does any body know what is the problem?. Thanks. OtherFunctions.obj : error LNK2001: unresolved external symbol "int
5
4786
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 codes so that i could generate a dll file out of it and used in my C# program.. When I compile, got no error and no warning. But when i build it, i have these errors.. *beginning* sendrcv.obj : error LNK2001: unresolved external symbol "int...
0
1891
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 VC++6.0 to compile my C code in order to get a DLL file for my C# program..but then..when i compile and build..i get 9 errors..n here they are... *beginning* sendrcv.obj : error LNK2001: unresolved external symbol "int __cdecl CS2_RECEIVE(struct...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.