i need help

Started by
16 comments, last by RaistlinMajere 20 years, 7 months ago
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
-----------------------------------------------------------"Shut up and eat your cheese sandwhich"
Advertisement
Make your project a Win32 console application.
I do that..i have tried both types thousands of times :-D...still doesnt work
-----------------------------------------------------------"Shut up and eat your cheese sandwhich"
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.
-= kill one you're a murderer, kill thousands you're a conquerer =-
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]
i tried that source still doesnt work
-----------------------------------------------------------"Shut up and eat your cheese sandwhich"
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.
Im fairly new at this and have no idea what the first part of that means :D. As for api C++.
-----------------------------------------------------------"Shut up and eat your cheese sandwhich"

This topic is closed to new replies.

Advertisement