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

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(wincrt0.obj) : error LNK2019: unresolved
external symbol _WinMain@16 referenced in function
_WinMainCRTStartup
Debug/HelloWorld.exe : fatal error LNK1120: 1 unresolved
externals

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

Build: 0 succeeded, 1 failed, 0 skipped

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

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

Linking...
libcmt.lib(wincrt0.obj) : error LNK2019: unresolved external symbol
_WinMain@16 referenced in function _WinMainCRTStartup
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
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,...
1
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...
2
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...
1
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
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...
4
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...
2
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: ...
0
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...
1
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:...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.