Search code examples
openglborland-c++

Setting up Opengl for Borlandc++


I have copied the glut.h file in c:/turbo/tc/include/ directory and glut32.dll in c:/windows/System32/.

After this what should I do ?


Solution

  • your path implies old Borland Turbo C++ 3.1 to me

    • which was the old MS-DOS C++ IDE (similar to Borland TP 7.0 pascal IDE)
    • in which you can not have classic 32bit OpenGL
    • there were some 16bit MS-DOS versions of GL+GLUT compatible ports of glut+gl libs.
    • so unless you do not have them then it will not work no matter you do
    • if you do then read the provided readme.txt or whatever to see how to use it
    • there were some tutorials on them but I strongly doubt you will find them on the internet
    • because most of old programing portals is off-line and stuff lost forever ...

    if you have newer compiler like Borland C++ BCC 5.0 or newer

    • then just include headers
    • link lib files for used dll's for example:

      #include "my_GL_headers\\glut.h"
      #pragma link "my_GL_headers\\glut.lib"
      
    • use implib tool if you do not have them or are incompatible

    • because most provided libs are for MSVC++
    • which are incompatible with standard Intel object format
    • for more info see difference between COMF and OMF
    • some header files already link their lib files so do this only if you have unresolved externals ...

    If you use IDE like Borland C++ builder 1,2,3,4,5,6 or Developer Studio 2006 Turbo C++

    PS this is how mine usual GL includes look like in BDS2006 projects

    #include <windows.h>
    #include <jpeg.hpp>
    #include <math.h>
    #define GLEW_STATIC
    #include "gl\glew.c"
    #include "gl\gl.h"
    #include "gl\glu.h"
    #include "gl\glext.h"
    #include "gl\wglext.h"   
    #include "gl\glut.h"
    
    • where gl is project source local folder
    • including all headers/objs/libs ...
    • the only lib you need is glut.lib (if you want to use glut)
    • GLEW can be either as lib/dll/obj or as C++ source code
    • I prefer the C++ source version under borland/embarcadero