Jump to content
  • Advertisement
Sign in to follow this  

problem compiling

This topic is 3971 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok, i'm a newbie programmer and am learning on my own from online tutorials and books. i had been doing simple programs using Visual C++, but then i stopped because of personal issues, but today i started back up. before the programs i wrote seemed to all work fine, but now the compiler gives me an "unresolved external" error. i have this code from a tutorial site:
#include <iostream>

using namespace std;

int main()
	cout<<"Hey, you, I'm alive! Oh, and Hello World!\n";

on the site it says this program works, but for some reason it, like i said, gives me the unresolved external error. if someone has any info for me, plz let me know what's wrong. also, if u think it may have something to do with not having a return value set up, i tried using 'return 0;' and got the same result, except without the return value warning. thanks ahead for the help

Share this post

Link to post
Share on other sites
ok, when i run the compile, it says this pasted below:

--------------------Configuration: app - Win32 Debug--------------------
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/app.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

app.exe - 2 error(s), 0 warning(s)

i have no idea what it means either, i've never seen it before, and i've even tried running simple calculator programs i know should work and they still don't

Share this post

Link to post
Share on other sites
That error means that when you created your project you created a windows application rather than a console application. Go to your linker settings and change the subsystem from windows to console. Depending on your version of MSVC it may be under Linker/System/SubSystem.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!