473,765 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.cp p
---------------------
#include "stdafx.h"
using namespace System::Reflect ion;
using namespace System::Runtime ::CompilerServi ces;
//
// 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:Assemb lyTitleAttribut e("")];
[assembly:Assemb lyDescriptionAt tribute("")];
[assembly:Assemb lyConfiguration Attribute("")];
[assembly:Assemb lyCompanyAttrib ute("")];
[assembly:Assemb lyProductAttrib ute("")];
[assembly:Assemb lyCopyrightAttr ibute("")];
[assembly:Assemb lyTrademarkAttr ibute("")];
[assembly:Assemb lyCultureAttrib ute("")];
//
// 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:Assemb lyVersionAttrib ute("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:Assemb lyDelaySignAttr ibute(false)];
[assembly:Assemb lyKeyFileAttrib ute("")];
[assembly:Assemb lyKeyNameAttrib ute("")];
--------------------------------
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::WriteL ine(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 7795

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

Similar topics

6
6118
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 runtime). Does it indicate a problem with References for example? Thanks Owen PS. replies cc'd by email appreciated. owen.southwood@mantix.com
0
888
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 the cssh.exe generate error. when i debug the error point to 'delete rs'. 'delete rs' was in this chunk of code: LIB_PREFIX long ResultSet_destroy(void *resultset) {ResultSet *rs = (ResultSet *)resultset; try{
3
4275
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?) This error point to the line conn.Close() on my finally statement. I am pretty new at this and I did not find much on the web. Any help would be greatly appreciated. My code is as follows: <%@ Page Language="C#" debug="true" %>
6
5206
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. I could not find this error defined. Any ideas of what it means, it's severity, how to track the cause and cure? Cheers,
1
287
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 the errors. The code I have thus far (sams as php.net less a few lines I didnt need): // user defined error handling function function userErrorHandler($errno, $errmsg, $filename, $linenum, $vars)
3
68956
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 fine on my development PC but when I moved the Web Service to a server on our network I get the following error: "Client found response content type of 'text/html; charset=utf-8', but
13
1748
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 error was the data writing a file so it seemed such a waste if all the data was lost and must be recalculated again. Sincerely, Sheldon
3
2416
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
32067
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 supposed to do, but on the new page it gives the following error: Before the common things start pouring in...
0
9568
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
9404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
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...
1
9959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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...
0
8833
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
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
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
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.