From: Christiaan S. <ck...@ia...> - 2001-10-25 20:52:20
Im following a tutorial on opengl and when i try to compile the code I =
get errors. I think its becuase it cant find these header files:
#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <gl\glaux.h>
Does dev-c++ have these files? Is there anything else i need to know =
before i start making opengl apps?
I changed CDS_FULLSCREEN to 0 as jason suggested and now I dont get a error
about it anymore but I do get these errors:
The code that this applies to is attached.
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x38):lesson1.cpp: undefined reference to
`glViewport@16'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x45):lesson1.cpp: undefined reference to
`glMatrixMode@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x4d):lesson1.cpp: undefined reference to
`glLoadIdentity@0'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x84):lesson1.cpp: undefined reference to
`gluPerspective@32'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x91):lesson1.cpp: undefined reference to
`glMatrixMode@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x99):lesson1.cpp: undefined reference to
`glLoadIdentity@0'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0xb7):lesson1.cpp: undefined reference to
`glShadeModel@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0xd1):lesson1.cpp: undefined reference to
`glClearColor@16'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0xe0):lesson1.cpp: undefined reference to
`glClearDepth@8'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0xf0):lesson1.cpp: undefined reference to
`glEnable@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x100):lesson1.cpp: undefined reference to
`glDepthFunc@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x115):lesson1.cpp: undefined reference to
`glHint@8'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x13b):lesson1.cpp: undefined reference to
`glClear@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x143):lesson1.cpp: undefined reference to
`glLoadIdentity@0'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x258):lesson1.cpp: undefined reference to
`wglMakeCurrent@8'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x282):lesson1.cpp: undefined reference to
`wglDeleteContext@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x8ce):lesson1.cpp: undefined reference to
`wglCreateContext@4'
C:\WINDOWS\TEMP\ccNmdcgb.o(.text+0x914):lesson1.cpp: undefined reference to
`wglMakeCurrent@8'
I found that if I say File>New Project>Graphics>OpenGl template and paste my
code in that almost all of the opengl code works. This I think is becuase
"-lopengl32" is being added ass a compiler option. I still get this linker
error though:
c:\dev-c++\untitled1.o(.text+0x84):untitled1.cpp: undefined reference to
`gluPerspective@32'
Can anyone help?
From: Christiaan S. <ck...@ia...> - 2001-10-26 16:27:04
I figured it all out! Whooohoo! Im am so proud of myself :-) I think =
this all should be added to the dev-c++ faq... how do i do that?
What I did was I added "-lopengl32 -lglu32" as compiler options to the =
project and then everything compiled just fine! I also replaced =
CDS_FULLSCREEN with 0
From: Ioannis V. <no...@ya...> - 2001-10-26 16:56:55
Ehehe, never mind what you did was an accomplishment. :)
Ioannis
* Ioannis Vranos
* Programming pages: http://www.noicys.f2s.com
<http://www.noicys.f2s.com/>
* Alternative URL: http://run.to/noicys
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of
Christiaan Scholtz
Sent: Friday, October 26, 2001 6:50 PM
To: dev...@li...
Subject: [Dev-C++] opengl in dev-c++?
Urgh its already in the faq all along! stoopid me!! urgh....
Hmm... yes I already did that... This is what I have so far.
bana-sea-
----- Original Message -----
From: Christiaan Scholtz
To: dev...@li...
Sent: Sunday, November 04, 2001 3:22 AM
Subject: [Dev-C++] opengl in dev-c++?
>I had the same problem. What you need to do is add #include <stdlib.h> at
the top and it should work fine