473,624 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

error LNK2019 and fatal error LNK1120

Tim
I am just creating a hellow world program and it gave me
these errors. can you help me out how to resolve this?

Thanks,
Tim

#include <iostream>

using namespace std;

int main()
{
cout << "hello World" << endl;
return 0;
}
Linking...
LIBCD.lib(wincr t0.obj) : error LNK2019: unresolved
external symbol _WinMain@16 referenced in function
_WinMainCRTStar tup
Debug/HelloWorld.exe : fatal error LNK1120: 1 unresolved
externals

Build log was saved at "file://c:\Documents and
Settings\tng\My Documents\Visua l Studio
Projects\HelloW orld\Debug\Buil dLog.htm"
HelloWorld - 2 error(s), 0 warning(s)
---------------------- Done ----------------------

Build: 0 succeeded, 1 failed, 0 skipped

Jul 21 '05 #1
1 5874
Did you manage to resolve this problem?

I am getting the same error when trying to link a library file:

Linking...
libcmt.lib(winc rt0.obj) : error LNK2019: unresolved external symbol
_WinMain@16 referenced in function _WinMainCRTStar tup
Debug/HelloWorld.exe : fatal error LNK1120: 1 unresolved externals

Cheers

<EDIT>
I eventually found that I was following some guidlines too closely.
They were creating a Window Application. My code was for a console
application and therefore uses main()
</EDIT>

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Jul 21 '05 #2

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

Similar topics

0
1681
by: Jim | last post by:
All, I'm trying to debug a Python GPF while running a script that we've written. After fixing up some of the paths for the Python build and successfully building Python from ActiveState source, I compiled the Python Extensions, but am getting the following error:
1
2156
by: Vishal Saxena | last post by:
Hi, I am new to this news group, hope to get prompt solution from you, gurus of VC. Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development SDK, I am trying to upgrade my project to VC++.NET, below is the code snipplet from the project
2
1571
by: hazizpour | last post by:
Hello I hope I am in the correct newsgroup, if not please let me know. I am trying to build a sample for using a certain library ( IFC mapping to C++ classes, see www.cstb.fr) with MS Visual Studio 2003. When building a sample program, I get the error mentioned in the title: LNK2019 Here is a snippet of the error message:
1
400
by: Tim | last post by:
I am just creating a hellow world program and it gave me these errors. can you help me out how to resolve this? Thanks, Tim #include <iostream> using namespace std;
0
1677
by: Usman | last post by:
Hi I've a COM compiled in visual studio 6 that is internally using zlib library (an opensource library for compression). I've no problem compiling that code. But when I moved to visual studio.Net it started giving me linker errors. The errors are given below. Is there any compiler option in the .Net studio that I'm missing because if there were a problem with the zlib library that I'm using, it must have given errors in VS 6 too. If...
4
6400
by: Sanjay Kumar | last post by:
Folks ! I am working with VC++ after a long time and having problem linking latest xerces 2.7 in VC++ 2005 Express Edition. I have done following: 1. downloaded and unpacked the the library: http://www.apache.org/dist/xml/xerces-c/binaries/xerces-c_2_7_0-windows_2000-msvc_60.zip
2
5316
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2 Ask on python-list@python.org . - Josiah
0
1551
by: Ling | last post by:
I am using boost.python to wrap C++ function which includes directmusic libraries to simply play the midi, but lots of linkage errors "error LNK2001: unresolved external symbol". I wonder if it is possible to work with DirectX - directmusic libs. Are there any ways to wrap it? *********************compilation errors ************************* msvc.link.dll bin\msvc-7.1\debug\threading-multi\playmusic.pyd bin \msvc-7.1\debu...
1
2121
by: Jonas Schneider | last post by:
Heya, don´t know if you know BOINC: it´s a system for distributed computing, therefore distributing work to many computers and creating a little super-computer, see also their homepage: http://boinc.berkeley.edu/. I get the folllowing errors when I want to compile their default application (WinXP, MSVC++E05):
0
8173
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
8621
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...
1
8335
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
7159
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
5563
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
4079
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...
1
2606
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
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.