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

MS VC++ .NET (2002) - Fatal Error LNK1561:entry point must be defined

Hi all,
I have Microsoft Visual C++ .NET (2002) program that is
installed on my Windows XP Professional Operating System
PC. I started my project (named HelloMCPP)in the Managed
C++ Application and added a DLL in the .h file to my
project for printing "Hello from Managed C++!" out in my
console. I did "Build" the program 'HelloMCPP' and I
got 'Fatal Error LNK1561: entry point must be defined
HelloMCPP'. I do not know how to define the entry point
in this project. Please help and advise how to define it
and get this project executed.
Thanks in advanve,
Scott Chang
******************
The following is the souce code of my HelloMCPP:
-------------------------------------
AssemblyInfo.cpp
---------------------
#include "stdafx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
//
// General Information about an assembly is controlled
through the following
// set of attributes. Change these attribute values to
modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("")];
[assembly:AssemblyProductAttribute("")];
[assembly:AssemblyCopyrightAttribute("")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
//
// Version information for an assembly consists of the
following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the
Revision and Build Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
//
// In order to sign your assembly you must specify a key
to use. Refer to the
// Microsoft .NET Framework documentation for more
information on assembly signing.
//
// Use the attributes below to control which key is used
for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not
signed.
// (*) KeyName refers to a key that has been installed
in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers
to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both
specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that
key is used.
// (2) If the KeyName does not exist and the
KeyFile does exist, the key
// in the KeyFile is installed into the CSP and
used.
// (*) In order to create a KeyFile, you can use the
sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of
the KeyFile should be
// relative to the project directory.
// (*) Delay Signing is an advanced option - see the
Microsoft .NET Framework
// documentation for more information on this.
//
[assembly:AssemblyDelaySignAttribute(false)];
[assembly:AssemblyKeyFileAttribute("")];
[assembly:AssemblyKeyNameAttribute("")];
--------------------------------
HelloMCPP.cpp
--------------------
// This is the main DLL file.
#include "stdafx.h"
#include "HelloMCPP.h"
----------------------
Stdafx.cpp
-------------------
// stdafx.cpp : source file that includes just the
standard includes
// HelloMCPP.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type
information
#include "stdafx.h"
----------------------
HelloMCPP.h
-----------------
// HelloMCPP.h

#pragma once

using namespace System;

namespace HelloMCPP
{
public __gc class HelloMCPP
{
public:
virtual void Hello()
{
Console::WriteLine(S"Hello from Managed C++!");
}
};
}
--------------------------------------
stdafx.h
-------------------------------
// stdafx.h : include file for standard system include
files,
// or project specific include files that are used
frequently,
// but are changed infrequently

#pragma once

#using <mscorlib.dll>

Nov 16 '05 #1
0 7770

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

Similar topics

6
by: owen | last post by:
Generally speaking, what does it mean when I see a "button" with red text showing this message instead of the control I've dragged onto the web form in Design View.? (But the page works fine at...
0
by: af28 | last post by:
hi, i am using microsoft visual c++ 6.0 in win xp pro. i got some problem when using cssh.exe that is corbascript. when the corbascript is try to access the dll file generated by a msvc6 program...
3
by: FC | last post by:
Hello All: I am getting the following error: Compiler Error Message: CS0246: The type or namespace name 'conn' could not be found (are you missing a using directive or an assembly reference?) ...
6
by: Steve Crawford | last post by:
I've started seeing the following in my logs: FATAL: invalid frontend message type 8 I searched back over a month and there are 5 instances of this error of which 4 are in the last 24 hours. ...
1
by: scuniverse | last post by:
Any ideas how to make a email report of all the error messages? I've read on php.net how to do it the problem is that it sends a email for each error instead of sending a single email with all...
3
by: John S | last post by:
Using VB.NET 2005, I created a Web Service that returns a dataset from a SQL Server database. In the same solution I created a test GUI with a Windows form to display the results. It worked...
13
by: Sheldon | last post by:
Hi. Does anyone know if one can resume a python script at the error point after the error is corrected? I have a large program that take forever if I have to restart from scratch everytime. The...
3
by: Pallav singh | last post by:
Hi All i am getting Error while writing following code for state design Pattern kindly let me know How to Correct this Error ?? Thanks Pallav Singh ...
10
by: Meganutter | last post by:
Hello, I have been stuck with this error for a while now and really want to get it fixed. The catch here is, i need to rewrite code and update it. when i use the old code the page loads as its...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
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...
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,...
0
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...
0
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...

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.