1st Tutorial Compiler Error

Started by
9 comments, last by USArmyMortars 19 years, 10 months ago
I read and FULLY understood your first tutorial for the first time! An absolute wonder tutorial. However, I generate this error when trying to compile the code: LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 I have tried a newer version of LIBCD.lib, and that also didnt work.. Does anyone have a solution to this?
HHC 1st Battalion, 5th Infantry Regiment1st Brigade (SBCT), 25th Infantry DivisionRest In Peace SSG Julian Melo
Advertisement
You have probably made a console app, it should be a win32 app, or reverse.
Agreed. Of course I didn''t figure out how to get around this for a year because my computer science teacher INSISTED that all C++ source files had to have a main() function.
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
What an idiot.

EDIT: not to offend him but as a computer science teacher you should know about the WinMain function, if he does it might be his way of teaching (not telling about possibilities to make things easier to remember), not my favorite way though.

[edited by - Tree Penguin on May 31, 2004 11:25:18 AM]
Well he was an oldschool teacher, and I think had a lot of pride in him too. He always did tend to underestimate whatever I was doing and yeah, he does have to deal with dumb kids all day, so I guess he''s just so used to giving that definitive ''don''t try and learn all the exceptions'' attitude. He''s the best darned computers teacher I''ve had so I can''t say much because he''s the only one that actually taught me anything. Sigh stupid american schools and their oftentimes inept teachers. This isn''t to say there aren''t many good ones but ARGH I don''t know how some of them get accredited.
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Well, i will probably do a 2-year master grade in GIVE (Geometry, Imaging and Virtual Environments) in 4 years (first i will have to finish a 4 or maybe 3 year bachelor study) and i hope i don''t get a computer science teacher like yours because i really like a study to be difficult and interesting (if it''s not i''d better do a different study or study on my own). By the way, aren''t there any requirements to enter your study, aren''t there any tests done to see if someone fits the study?
Well it''s just highschool computer science, so all you need really is to pass a couple of courses at a local college in education and prove your competency in the area being taught (in my case AP comp sci AB), which isn''t hard. The standards are very very low -_-.
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Ok, I made 2 work spaces... Win32 App and a Win32 Console App. I generate errors in both. With the Win32 App, I generate the error stated above. With the Win32 Console App I generate thiis error:

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Ive read up on the error and read that I needed to add to my Projrct Settings > Link > Output > Entry-Point Symoble: WinMainCRTStartup

I did that and came up with the same results.

This is quite an annoyance =P
HHC 1st Battalion, 5th Infantry Regiment1st Brigade (SBCT), 25th Infantry DivisionRest In Peace SSG Julian Melo
Congrats you just found out why I include NeHeGL.h in all my programs! I''m stumped given that Lesson1 does in fact contain a Winmain()
My fellow Americans I have just signed legislation that outlaws Russia forever. Bombing will commence in five minutes.
Yes, it sure does. And I have been reading that that error is generated because of the missing presence of WinMain(). This is boggling me to no extent.

[edited by - usarmymortars on May 31, 2004 2:16:15 PM]
HHC 1st Battalion, 5th Infantry Regiment1st Brigade (SBCT), 25th Infantry DivisionRest In Peace SSG Julian Melo

This topic is closed to new replies.

Advertisement