CBS_FULLSCREEN + Dev-C++

Started by
10 comments, last by ScallionODI 23 years, 1 month ago
My compiler (dev-c++) tells me CBS_FULLSCREEN is undeclared in lesson02 from NEHE productions. What do I do? it was the msvc version, i cant afford msvc cause im pretty poor now.
Advertisement
Here''s a snippet of code (e.g. the line where it''s problematic)

/* begin code */

// Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.
if (ChangeDisplaySettings(&dmScreenSettings, CBS_FULLSCREEN )!=DISP_CHANGE_SUCCESSFUL)

/* end code */
In the current distrubution of Dev-C++, CDS_FULLSCREEN is undefined. You need to define it yourself, so at the top of your source type this:

#define CDS_FULLSCREEN 4

Then recompile, the code should work fine.
"...."
Even better! thanks for yr reply, but i have bad news:

c:\windows\TEMP\ccfLu9fb.o(.text+0x1bb):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x1d9):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x1e1):lesson2.cpp: undefined reference to `glEnd@0''
c:\windows\TEMP\ccfLu9fb.o(.text+0x1f9):lesson2.cpp: undefined reference to `glTranslatef@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x206):lesson2.cpp: undefined reference to `glBegin@4''
c:\windows\TEMP\ccfLu9fb.o(.text+0x224):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x23b):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x259):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x27e):lesson2.cpp: undefined reference to `glVertex3f@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0x286):lesson2.cpp: undefined reference to `glEnd@0''
c:\windows\TEMP\ccfLu9fb.o(.text+0x3b8):lesson2.cpp: undefined reference to `wglMakeCurrent@8''
c:\windows\TEMP\ccfLu9fb.o(.text+0x3e2):lesson2.cpp: undefined reference to `wglDeleteContext@4''
c:\windows\TEMP\ccfLu9fb.o(.text+0x9b4):lesson2.cpp: undefined reference to `ChoosePixelFormat@8''
c:\windows\TEMP\ccfLu9fb.o(.text+0x9f8):lesson2.cpp: undefined reference to `SetPixelFormat@12''
c:\windows\TEMP\ccfLu9fb.o(.text+0xa2e):lesson2.cpp: undefined reference to `wglCreateContext@4''
c:\windows\TEMP\ccfLu9fb.o(.text+0xa74):lesson2.cpp: undefined reference to `wglMakeCurrent@8''
c:\windows\TEMP\ccfLu9fb.o(.text+0xdba):lesson2.cpp: undefined reference to `SwapBuffers@4''

Make sure all of the OpenGL libs are included in your project. I don''t remember how to do that for Dev C++ (it''s been a while since I used it), but I know there''s a way .

"Finger to spiritual emptiness underlying everything." -- How a C manual referred to a "pointer to void." --Things People Said
Resist Windows XP''s Invasive Production Activation Technology!
http://www.gdarchive.net/druidgames/
You should also create a windows GUI app.
c:\dev-c++\opengl\lesson2.o(.text+0x9b4):lesson2.cpp: undefined reference to `ChoosePixelFormat@8''
c:\dev-c++\opengl\lesson2.o(.text+0x9f8):lesson2.cpp: undefined reference to `SetPixelFormat@12''
c:\dev-c++\opengl\lesson2.o(.text+0xdba):lesson2.cpp: undefined reference to `SwapBuffers@4''

these are the errors after i included all the files in my project. are there any other thingies i should d/l for opengl?

i have gl.h, glaux.h, and glu.h in my includes currently.

They are in the GDI library that you links to if you create a window GUI app or whatever the IDE calls it. From the command line would it be the -mwindows switch.
Hm...hey guys, my dev-c++ compiler wont reflect changes in the code when i recompile it.

first, it would''nt change the color of the square in lesson 2.
then i changed the "fullscreen or not?" messagebox text and it did''nt change that when i ran it.

how do i fix this?
Hey ScallionODI,

How''d you fix those linker problems?

Thanks.

This topic is closed to new replies.

Advertisement