Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Windows-Linux WGL error.

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2005
    Location
    Budapest (Hungary,Europe)
    Posts
    26

    Windows-Linux WGL error.

    here's what i did: I made a complete game under Linux, using only cmath, cstdio, cstdlib and glut,gl,glu libraries, and it worked. Now, that I wanted to compile it for Windows(cause I need to post Windows-compatible ), I downloded DevCpp, installad the glut's devPak, setted the lib imports at linker parameters to: libopengl32.a libglu32.a libglut32.a . When I try to build my project, I receive Linker Errors like:

    [Linker Error] undefined reference to 'glPixelStorei@8'
    ...
    [Linker Error] undefined reference to 'glBitMap@28'
    ...
    [Linker Error] undefined reference to wglGetCurrentContext
    ...
    [Linker Error]undefined reference to 'SelectPalette@12'
    ...
    etc

    Some help ?

  2. #2
    Intern Newbie
    Join Date
    Mar 2005
    Location
    A Coruņa (Spain)
    Posts
    44

    Re: Windows-Linux WGL error.

    The libraries .a are a linux format. You need the .lib files. I don't know how do you configure DevCpp to use this. I normally have something like this:
    #ifdef WIN32
    #pragma comment(lib, "glew32.lib")
    //#pragma comment(lib, "glew32s.lib")
    #pragma comment(lib, "opengl32.lib")
    #pragma comment(lib, "glu32.lib")
    #pragma comment(lib, "SDL.lib")
    #pragma comment(lib, "SDLmain.lib")
    #pragma comment(lib, "libxml2.lib")

    #endif

    to avoid a need to reconfigure the current compiler for your libraries (some people doen't like the #ifdef WIN32, to avoid "dirt" the code).

  3. #3
    Intern Newbie
    Join Date
    Apr 2004
    Location
    Cape Town
    Posts
    44

    Re: Windows-Linux WGL error.

    Which compiler do you have underlying DevCPP? I've had some problems using the GLUT libraries that are designed for MSVC; you should try to find a mingw-specific version of glut.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •