Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RaistlinMajere

i need help

This topic is 5406 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

whenever i make a program and execute it (its bugless of course) i always get this error in any project when i run it: LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/dfdfsdfsfs.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. even if its just a program that outputs hello world. RAWRR!!! SOME ONE help me...this is driving my nuts... -thanks

Share this post


Link to post
Share on other sites
Advertisement
Make sure you typed "main" correctly, meaning the ''m'' is not capitalized, if you are doing this in a console app. If its a windows app make sure you type winmain with all smallcase. AFAIK thats the problem your having.

Share this post


Link to post
Share on other sites
try this source:

#include <iostream>
using namespace std;
int main(int argc, char* argv[]){
cout<<"Hello, world"<<endl;
return 0;
}

if you want, you can post the source, and I can try to compile it on my machine.

[edited by - bastard2k5 on September 1, 2003 8:23:29 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by RaistlinMajere
i tried that source still doesnt work


Double check that you did exactly as twix said. As far as I can tell you either don''t have a main or you didn''t set up your project properly.

Share this post


Link to post
Share on other sites
quote:
Original post by RaistlinMajere
i tried that source still doesnt work

Make sure the extension of the file is cpp and not h, or hpp or something like that. Otherwise your file most-likely will not even be compiled (hence the link error with main).

EDIT: Also, make sure you have the cpp file as a part of the project and not just opened in your IDE.

[edited by - Polymorphic OOP on September 1, 2003 10:35:55 PM]

Share this post


Link to post
Share on other sites
Are you building the app as a release or debug version?
Try debug, I think.
What API are you using?

-------------------------------
Anton Karlsson
Klingis Entertainment
Games with silly humor

Just dreaming wont make you (more) skilled in game programming/development.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!