I have a Problem Setting up OpenGL with Embarcadero's C++-Builder.
I managed to successfully compile the Project from here
http://edn.embarcadero.com/article/10528
so I can use functions like glClearColor
, or glBegin()
, glVertex3f()
or glEnd
, but I get unresolved external Errors when I try and use
glGenBuffers
, glBindBuffer
, glUseProgramm
and so on.
Question: What are the steps to follow to set this up correctly?
I also downloaded Glew from here http://glew.sourceforge.net/. The binary Version does not work, because as usually you can't use .lib files for Visual Studio with Embarcadero.
So I tried to compile the sources with Embarcadero. There is a CMakeLists.txt, but when I type cmake -G "Borland Makefiles" path-to-my-downloaded-sources in the Directory where I want my Borland Makefiles, the error message is
Could NOT find PkgConfig.
The sources I downloaded from http://glew.sourceforge.net/ do only contain 3 .c-files, so I created myself a Static-Library Project with Embarcadero and built it. Now If I add These test lines to my Project
#include <GL\glew.h>
GLuint buffer;
glGenBuffers(1, &buffer);
and link to that static library, it compiles, but I get a runtime error
Access Violation at adddress ...
Adding the glew32.dll from the bin-Version of GLEW does not help here.
So what should I do? In particular, how do I compile a .dll with Embarcadero, although glew.c from the sources does not contain any __declspec(DLL_EXPORT) Statement?