Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: I Need some help with my compiler

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    7

    I Need some help with my compiler

    Hello I am new to OpenGl, by about 5 days, i have written some of my own code, but the problem i am having is that the compiler i have which is Dev-C++ 4 is not compiling my programs, it is always giving me errors for all the code i put in. its got its own opengl demo that compiles fine, but when i use the code i learned from NeHe's site it doesnt work i always get a compile error for:

    532 c:\progra~1\merger~1\opengl~1\bounci~1.cpp
    `CDS_FULLSCREEN' undeclared (first use this function)

    and i really dont know what to do, i know c++ but i am still new to that. so i am not sure what it is. i really would like to figure this out before i go on my bike trip across america which is in a few days. so i can start working on my programs while im on the trip, im bringin my computer (but i dont have internet access that i can use cuz i wont be near any phones) well any help will be appreciated. thanks, -Levi

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: I Need some help with my compiler

    Sounds like you didn't include windows.h.

  3. #3
    Junior Member Newbie
    Join Date
    Jul 2001
    Location
    ---
    Posts
    5

    Re: I Need some help with my compiler

    I had the same problem when I first started programming OpenGL. This problem has to do with the fact that you either:
    - did not #include <windows.h>
    - CDS_FULLSCREEN is not defined in your windows.h

    The last was the case with me and as I understand some other people also had this problem. It's easy to solve this problem, you can either do:
    - #define CDS_FULLSCREEN 4 (or something similar) in your program
    - or you could put it into your windows.h along where the rest of the CDS_xxx is located

    Hope this is helpful.

    [This message has been edited by UnImPortant (edited 07-21-2001).]

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    7

    Re: I Need some help with my compiler

    i will try that thanx

  5. #5
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    7

    Re: I Need some help with my compiler


    YES!!!!!!!!!!! IT WORKED! THANX DUDE!

  6. #6
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: I Need some help with my compiler

    CDS_FULLSCREEN is defined in winuser.h
    windows.h includes winuser.h

  7. #7

    Re: I Need some help with my compiler

    i had the same problem, and can u explain more clearly to how to fix the problem? every openGL source code i put in that i got from tutorial website and compile never work in dev C++, i dont know why.

  8. #8

    Re: I Need some help with my compiler

    WAIT! i just fixed that problem now i got all thse linker error!
    c:\windows\TEMP\cc59hzfb.o(.text+0x762):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x78a):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x7b9):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x7e1):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x7f:lesson5.cpp: undefined reference to `glColor3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x819):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x833):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x854):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x87c):lesson5.cp p: undefined reference to `glVertex3f@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x884):lesson5.cp p: undefined reference to `glEnd@0'
    c:\windows\TEMP\cc59hzfb.o(.text+0x9d:lesson5.cpp: undefined reference to `wglMakeCurrent@8'
    c:\windows\TEMP\cc59hzfb.o(.text+0xa02):lesson5.cp p: undefined reference to `wglDeleteContext@4'
    c:\windows\TEMP\cc59hzfb.o(.text+0xfd4):lesson5.cp p: undefined reference to `ChoosePixelFormat@8'
    c:\windows\TEMP\cc59hzfb.o(.text+0x101:lesson5.cpp: undefined reference to `SetPixelFormat@12'
    c:\windows\TEMP\cc59hzfb.o(.text+0x104e):lesson5.c pp: undefined reference to `wglCreateContext@4'
    c:\windows\TEMP\cc59hzfb.o(.text+0x1094):lesson5.c pp: undefined reference to `wglMakeCurrent@8'
    c:\windows\TEMP\cc59hzfb.o(.text+0x13da):lesson5.c pp: undefined reference to `SwapBuffers@4'

    someone helP!
    i'm using devC++4

  9. #9
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: I Need some help with my compiler

    ive never used devc but it seems youre not linking to the libraries that have the opengl
    stuff. with vc u will get approx the same errors if u don't link to opengl32.lib , i dont know what the opengl library for devc is but check the devc library directory for any that look like they have something to do with opengl + link with those

  10. #10
    Junior Member Newbie
    Join Date
    Jul 2001
    Posts
    7

    Re: I Need some help with my compiler

    Hola dude, well ya know what you should do, i got borland c++ 5.0 for free on their site, it works actually works.

Page 1 of 2 12 LastLast

Similar Threads

  1. Best Compiler?
    By TheMadhatt3r in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-14-2006, 06:20 AM
  2. Which C++ compiler
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 06-10-2004, 03:35 AM
  3. Cg Compiler
    By Quaternion in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 09-17-2002, 04:45 AM
  4. How to compiler under OSX
    By in forum OpenGL: macOS
    Replies: 1
    Last Post: 06-17-2001, 05:19 AM
  5. How to compiler under OSX
    By in forum OpenGL: macOS
    Replies: 3
    Last Post: 05-29-2001, 08:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean