Jump to content


A Noob's Post please help me


3 replies to this topic

#1 dawicked

    New Member

  • Members
  • Pip
  • 4 posts

Posted 16 September 2005 - 05:45 PM

HI
ME NOOB , ME DON't KNOW :blush:
I'm trying to learn VC++ from trials ( and documentation of course) but i got stuck at the begginin' ( lol that's weird uh ?:D )
I'm using Nehe's trials .. wich most of u heard about .. and i have a major problem. I write the source in the source file , make an active workspace , no compilation errors only theese link errors :

"
error LNK2001: unresolved external symbol _gluPerspective@32
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glViewport@16
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glHint@8
Lesson1.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4 ......... and so on .. 16 errors "

That doesnt intrige me cause i know i'm in the .idiot. stage but what intriges me is that when i download Nehe's program with his workspace and build the damn thing .. NO ERRORS .. where do i go wrong .. i looked everywhere but obviously not where i should of looked .. please help .. thanks for reading :unsure:

#2 awood

    Member

  • Members
  • PipPip
  • 33 posts

Posted 16 September 2005 - 05:53 PM

looks like your project is missing the opengl libraries. Either go to your project settings in visual studio and add opengl32.lib glu32.lib and glaux.lib to the Additional Dependencies field (in the Linker project settings) OR

add the following lines to the top of your main cpp file:
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "glaux.lib")

If I remember correctly, the Nehe explains how to do this early in Lesson 1.

"nehe" said:

The first thing you will have to do is build a project in Visual C++. If you don't know how to do that, you should not be learning OpenGL, you should be learning Visual C++. The downloadable code is Visual C++ 6.0 code. Some versions of VC++ require that bool is changed to BOOL, true is changed to TRUE, and false is changed to FALSE. By making the changes mentioned, I have been able to compile the code on Visual C++ 4.0 and 5.0 with no other problems.

After you have created a new Win32 Application (NOT a console application) in Visual C++, you will need to link the OpenGL libraries. In Visual C++ go to Project, Settings, and then click on the LINK tab. Under "Object/Library Modules" at the beginning of the line (before kernel32.lib) add OpenGL32.lib GLu32.lib and GLaux.lib. Once you've done this click on OK. You're now ready to write an OpenGL Windows program.


#3 shiaolin_monk

    Member

  • Members
  • PipPip
  • 80 posts

Posted 16 September 2005 - 06:41 PM

managed is gooooood.
Ma mama said life was like a box of chocolate, you think its sweet but then you discover its dark.

#4 dawicked

    New Member

  • Members
  • Pip
  • 4 posts

Posted 18 September 2005 - 09:55 AM

Ok .. so i'm done with this ..
word of advice from noob to noobs :D :
please don't start learning graphics from tutorials if you don't know the basics of the (let's say) c++ : Operators Arrays structures variables functions strings dynamic memory user defined data types Object-oriented Programming exception handling and so on .. as i said in the thread i presented my self .. i am flash user/builder but in the "predefined stuff / rarely using functions , procedures blablabla " way so those kind of things u learn them pretty quick from tutorials .. and i thought .. well that must also be the way with graphics .. but i was SO SO WRONG . I did a lill' C++ in school , tones of Turbo Pascal and Visual Fox pro so i had some idea of what those tutorials were saying ... but the thing that most don't realise is that tutorials don't explain the logic use of the function , the logic use of the operator , it doesn't explain the basics of that operator .. the circumsances in wich it has to be used so i'm starting allover and going for the book that does it .... i know this affirmation should of been poested by an advanced programmer but i've read the forum and most encourage tutorials for noobs that actually post they don't have a clue of C++ and other stuff . thank you for reading .. this is the way i felt so don't blame me for writing this ... bbyeee





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users