How to get independent from GLEW dll file
I'm literally an absolute noob in GL. I just wrote my first GLEW piece of code yesterday:
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/glfw.h>
int main(void)
{
glfwInit();
glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwOpenWindow(640, 480, 8, 8, 8, 0, 24, 0, GLFW_WINDOW);
glewInit();
glfwSetWindowTitle("OpenGL Rules!");
glfwEnable( GLFW_STICKY_KEYS );
do{
glfwSwapBuffers();
}while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS && glfwGetWindowParam( GLFW_OPENED ) );
}
This compiles just fine with (using mingw on win8 x64):
gcc opengl.c -lglfw -lglew32 -lopengl32
However, in order to run the output, I have to copy the glew32.dll to the same directory from which I'm running the program. Is there a way to get independent from the dll? Like, compiling once and using without having to carry the dll around?
I'm literally an absolute noob in GL. I just wrote my first GLEW piece of code yesterday:
#include <stdio.h>
#include <stdlib.h>
#include <GL/glew.h>
#include <GL/glfw.h>
int main(void)
{
glfwInit();
glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwOpenWindow(640, 480, 8, 8, 8, 0, 24, 0, GLFW_WINDOW);
glewInit();
glfwSetWindowTitle("OpenGL Rules!");
glfwEnable( GLFW_STICKY_KEYS );
do{
glfwSwapBuffers();
}while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS && glfwGetWindowParam( GLFW_OPENED ) );
}
This compiles just fine with (using mingw on win8 x64):
gcc opengl.c -lglfw -lglew32 -lopengl32
However, in order to run the output, I have to copy the glew32.dll to the same directory from which I'm running the program. Is there a way to get independent from the dll? Like, compiling once and using without having to carry the dll around?
No comments:
Post a Comment