i need help
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
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.
try this source:
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]
#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]
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.
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]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement