473,396 Members | 1,891 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,396 software developers and data experts.

problem while wrapping unmanaged c++ code in managed c++

Hi

I have created a unmanaged class in a header file UnManaged.h

class UnManaged
{
UnManaged(){}
~UnManaged(){}
void HelloWorld(){}
};

I also created a .Net C++ class library to wrap this class and included the
header file "UnManaged.h" .

The Managed wrapper class definition follows,

__gc class ManagedClass
{

public ManagedClass()
{
m_objClass = new UnManaged()
}

~ManagedClass()
{
deelte m_objClass;
}

private:

UnManaged* m_objClass;
};

while building the class library code in .Net i am getting the following error

error LNK2019: unresolved external symbol _main referenced in function
_mainCRTStartup

Could anyone tell met why this linker error came and how to reolve this issue?

Thanks in advance

Jul 21 '05 #1
0 1149

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: David Kantowitz | last post by:
I am trying to wrap a native-C++ DLL in managed C++, to use in a .NET project. The native code is compiled into a DLL, and I have created a .def file that exports the mangled names of the...
0
by: Arthur Roodenburg | last post by:
Hello, I have a huge set of unmanaged C++ classes, which I wrapped in managed C++. Everything is in one assembly. Using my wrapper in C# works fine. However, when I would like to use the...
4
by: CristianMori | last post by:
Hi there. In c++ Managed, is there a way to seamless wrap an unmanaged struct in a managed class without having to write access code for all the memebers? ie.. typedef struct { char Name;...
2
by: Jacob Cohen | last post by:
Under VC7.1, I am trying to wrap a native-C++ DLL that contains C++ objects in a Managed-C++ class library for use in a C# project. I created and compiled the native DLL under VC7.1 as a Win32...
2
by: Paul Kenny | last post by:
Hi, I am trying to expose the functionality of an unmanaged C++ class to the other languages available in the .NET Framework. I have decided to do this by wrapping the unmanaged C++ class in a...
0
by: Ola Sprauten | last post by:
I got a .NET class library project where I have written a managed wrapper for some unmanaged code. The managed wrapper is then used by a c# .net application. The problem I am having is that the...
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
1
by: jsroberts | last post by:
I have been desperately trying to solve a problem where I am wrapping an unmanaged dll with managed extensions for c++ and then calling the managed dll functions from C#. However, whenever I call...
0
by: Vinoth Kumar | last post by:
Hi I have created a unmanaged class in a header file UnManaged.h class UnManaged { UnManaged(){} ~UnManaged(){} void HelloWorld(){} };
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.