title: Setting up OpenGL on Embarcadero's C++-Builder
body: <p>I have a Problem Setting up OpenGL with Embarcadero's C++-Builder.
  I managed to successfully compile the Project from here<br>
   <a href="http://edn.embarcadero.com/article/10528" rel="nofollow">http://edn.embarcadero.com/article/10528</a><br>
  so I can use functions like <code>glClearColor</code>, or <code>glBegin()</code>, <code>glVertex3f()</code> or <code>glEnd</code>, but I get unresolved external Errors when I try and use 
  <code>glGenBuffers</code>, <code>glBindBuffer</code>, <code>glUseProgramm</code> and so on.</p>
  
  <p>Question: What are the steps to follow to set this up correctly?</p>
  
  <p>I also downloaded Glew from here <a href="http://glew.sourceforge.net/" rel="nofollow">http://glew.sourceforge.net/</a>.
  The binary Version does not work, because as usually you can't use .lib files for Visual Studio with Embarcadero.</p>
  
  <p>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</p>
  
  <p>Could NOT find PkgConfig.</p>
  
  <p>The sources I downloaded from <a href="http://glew.sourceforge.net/" rel="nofollow">http://glew.sourceforge.net/</a> 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</p>
  
  <pre><code>#include &lt;GL\glew.h&gt; 
  GLuint buffer;
  glGenBuffers(1, &amp;buffer);
  </code></pre>
  
  <p>and link to that static library, it compiles, but I get a runtime error</p>
  
  <p>Access Violation at adddress ...</p>
  
  <p>Adding the glew32.dll from the bin-Version of GLEW does not help here.</p>
  
  <p>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?</p>