I admit it, I stink.

Started by
8 comments, last by GrandMLee 22 years, 1 month ago
When trying to compile my first window for OpenGL, I get these linking errors: --------------------Configuration: Lesson1 - Win32 Debug-------------------- Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Lesson1.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. Lesson1.exe - 2 error(s), 0 warning(s)
If at first you don't succeed, use profanity and try, try again.
Advertisement
seems like someone is trying to compile a windows program (WinMain) in console mode (main), change the project to create win32 app

Ok, thanks. That solved that problem:

--------------------Configuration: Lesson 1 - Win32 Debug--------------------

Lesson 1.exe - 0 error(s), 0 warning(s)



But now when I try to run it, I get a pop up window that says:
Cannot Execute program
If at first you don't succeed, use profanity and try, try again.
Wow, that almost sounded as if you did not programme that app/game for yourself!

"I get a popup box" is what I meant.

If you take a look at your code, you''ll probably find a piece saying "if error blablabla: MessageBox(This is the popup you saw)"

So just look up in your code what the cause is of the error, it could be things like problems with going to fullscreen, not being able to make a hDC or whatever :D it could be a lot of things. I advise you to change the message the messageboxes (or popups) give you when an error occurs, so you know immediatly what is wrong... It really helps when debugging and when people report errors (you can do a lot more with "i got an error when going to fullscreen" than with "it said the game had an error"

get what I mean? I think (but I might be wrong) you haven''t readed the code too well, since you didn''t figure the above yourself. Nothing wrong with that, a lot of people don''t really exactly ''know'' the lesson after their first contact with it, but I advise you to study Lesson 1 very well since it''s a really big one for a beginner (it took me a week ) and you''ll have to use it in every game you''ll ever make with OpenGL... (no we won''t use GLUT )

It''s better to waste a month on that lesson and understand it perfectly than hurrying the lesson and having to face all those weird bugs and stuff the rest of your programming career without knowing what the problem is.

If you don''t understand certain parts of the code, you can of course always ask here what the code does, and why.



KING CLAUDIUS Now, Hamlet, where''s Polonius?

HAMLET At supper.

KING CLAUDIUS At supper! where?

HAMLET Not where he eats, but where he is eaten
Actually, I already did a search for that string, and it isn't in the code. This is something Visual Studios is thowing up (I can tell this because he has all of the error window titles set to null, and the window that pops up has a visual studio c++ title), not my application.

This is the tutorial strait from NEHE.com. Of course I didn't write it. All I did was look at the comments and followed along with the tutorial.



Edited by - grandmlee on March 13, 2002 10:01:25 AM
If at first you don't succeed, use profanity and try, try again.
"Cannot Execute Program" is definitely not something that comes out of NeHe''s code.

I suspect that something has happened, such as the executable is access-locked for some reason, or something. MSVC just can''t get permission to read it(i think). Try the General Windows Fix the Damned Thing Solution(tm), ie restart.

-----------------------------
Direct3D vs. OpenGL
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
Democracy is where you say what you want and do what you''re told.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
right before this window appears, another comes up asking if I want to create a debug folder

c:\program files\microsoft visual studio\myprojects\lesson 1\debug\lesson 1.exe

this file does not exist. do you want to build it?
yes no

i click yes, then get the other window.

Edited by - grandmlee on March 13, 2002 10:07:56 AM
If at first you don't succeed, use profanity and try, try again.
quote:Original post by Promit
"Cannot Execute Program" is definitely not something that comes out of NeHe''s code.

I suspect that something has happened, such as the executable is access-locked for some reason, or something. MSVC just can''t get permission to read it(i think). Try the General Windows Fix the Damned Thing Solution(tm), ie restart.

-----------------------------
Direct3D vs. OpenGL
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
Democracy is where you say what you want and do what you''re told.


tried that, believe me, I try not to be an idiot before posting.
If at first you don't succeed, use profanity and try, try again.
I figured it out!!!!!!!!!!!!!!!

I was trying to run it strait out of a zip file. it could''t make a file inside a zip folder.
If at first you don't succeed, use profanity and try, try again.
surprise, surprise hehe... sorry =)

cya,
Phil

Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states )
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )

This topic is closed to new replies.

Advertisement