Advertisement

Tutorial 1 problems

Started by May 14, 2003 09:06 PM
1 comment, last by profesa 21 years, 9 months ago
I am running Visual C++ 6.0, I copied the tutorial code exactly but I keep on getting a error. It looks like this: LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Lesson1.exe : fatal error LNK1120: 1 unresolved externals i have all 3 OpenGL files linked, i would appreciate any help
this was from another post...thought it might help......

----------------------------------------------------------

ok so im writing a bunch of code and i compile it fun it runs fine everything...then the next day i try to open up my project file and the source file...ok it opens i compile it and guess what i get...22 errors...ok easy to fix...i go to the project settings and add the gl files...ok then i get 2 errors and here they are, please help me out:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/lesson2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

why would this do this after it has worked b4?




Xiachunyi Member since: 3/7/2003 From: USA
Posted - 10 May 2003 12:33:18 PM
Did you move anything around since the last time you''ve compiled it?



uber_n00b Member since: 2/16/2003 From: USA
Posted - 10 May 2003 1:11:46 PM
those are like the errors of death.. I sure hate them. Here''s how I resolve them however idiotic it is.. repaste all my code if it isn''t too large into NeHe''s base code for a window. It usually works. Remember to open the workspace each time too I know with VC++ if you just open the cpp file the program yells at you

My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.



NaliXL Member since: 9/27/2001 From: Zuid-Holland, Netherlands
Posted - 10 May 2003 1:24:28 PM
quote:
--------------------------------------------------------------------------------
Original post by uber_n00b
those are like the errors of death.. I sure hate them. Here''s how I resolve them however idiotic it is.. repaste all my code if it isn''t too large into NeHe''s base code for a window. It usually works. Remember to open the workspace each time too I know with VC++ if you just open the cpp file the program yells at you

--------------------------------------------------------------------------------


Looks like something is corrupting source-code or compiler/linker cache files then, isn''t it?





snisarenko Member since: 9/29/2002
Posted - 10 May 2003 5:09:52 PM
quote:
--------------------------------------------------------------------------------
Original post by uber_n00b
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
--------------------------------------------------------------------------------



My fellow Americans ... ur tax dollars went on making sure Sadam has a peaceful retirement, and on that "military parade" in Iraq .....


______________________________
My Website: <link src="http://www.antondev.tk">
or directly at http://home.attbi.com/~antonweb/
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede


[edited by - snisarenko on May 10, 2003 5:11:15 PM]



NafdahliX Member since: 4/16/2000 From: Sweden
Posted - 10 May 2003 5:22:14 PM
You are trying to compile as a win32 console application.



Smokey97 Member since: 10/23/2002 From: ACT, Australia
Posted - 10 May 2003 8:09:42 PM
as Xiachunyi said, are you trying to compile it as awin32 console application, if so this IS your problem.

You have to compile it as a Win32 Application, and #include <windows.h>

if you try to compile as a Win32 console application, it will look for a main(); function, but if you compile as a Win32 application, it will look for WinMain or something (i''m not too sure, as i dont use Win32 API...)

anyway, i hope this helps.

Smokey`

Advertisement
this was from another post...thought it might help......

----------------------------------------------------------

ok so im writing a bunch of code and i compile it fun it runs fine everything...then the next day i try to open up my project file and the source file...ok it opens i compile it and guess what i get...22 errors...ok easy to fix...i go to the project settings and add the gl files...ok then i get 2 errors and here they are, please help me out:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/lesson2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

why would this do this after it has worked b4?




Xiachunyi Member since: 3/7/2003 From: USA
Posted - 10 May 2003 12:33:18 PM
Did you move anything around since the last time you''ve compiled it?



uber_n00b Member since: 2/16/2003 From: USA
Posted - 10 May 2003 1:11:46 PM
those are like the errors of death.. I sure hate them. Here''s how I resolve them however idiotic it is.. repaste all my code if it isn''t too large into NeHe''s base code for a window. It usually works. Remember to open the workspace each time too I know with VC++ if you just open the cpp file the program yells at you

My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.



NaliXL Member since: 9/27/2001 From: Zuid-Holland, Netherlands
Posted - 10 May 2003 1:24:28 PM
quote:
--------------------------------------------------------------------------------
Original post by uber_n00b
those are like the errors of death.. I sure hate them. Here''s how I resolve them however idiotic it is.. repaste all my code if it isn''t too large into NeHe''s base code for a window. It usually works. Remember to open the workspace each time too I know with VC++ if you just open the cpp file the program yells at you

--------------------------------------------------------------------------------


Looks like something is corrupting source-code or compiler/linker cache files then, isn''t it?





snisarenko Member since: 9/29/2002
Posted - 10 May 2003 5:09:52 PM
quote:
--------------------------------------------------------------------------------
Original post by uber_n00b
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
--------------------------------------------------------------------------------



My fellow Americans ... ur tax dollars went on making sure Sadam has a peaceful retirement, and on that "military parade" in Iraq .....


______________________________
My Website: <link src="http://www.antondev.tk">
or directly at http://home.attbi.com/~antonweb/
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede


[edited by - snisarenko on May 10, 2003 5:11:15 PM]



NafdahliX Member since: 4/16/2000 From: Sweden
Posted - 10 May 2003 5:22:14 PM
You are trying to compile as a win32 console application.



Smokey97 Member since: 10/23/2002 From: ACT, Australia
Posted - 10 May 2003 8:09:42 PM
as Xiachunyi said, are you trying to compile it as awin32 console application, if so this IS your problem.

You have to compile it as a Win32 Application, and #include <windows.h>

if you try to compile as a Win32 console application, it will look for a main(); function, but if you compile as a Win32 application, it will look for WinMain or something (i''m not too sure, as i dont use Win32 API...)

anyway, i hope this helps.

Smokey`



I mostly use MSN messanger so add me to your buddy list, or on AIM ID sethafer.
I mostly use MSN messanger so add me to your buddy list, or on AIM ID sethafer.

This topic is closed to new replies.

Advertisement