well i tried the opengl loader generator.
i generated the files with this code from there website:
Code :
lua LoadGen.lua core_4_3 -style=pointer_c -spec=gl -version=4.3 -profile=core -stdext=gl_ubiquitous.txt -stdext=gl_plat_3_3.txt
my program compiles fine but still crashes. are there any compatibility issues for opengl loader generator? im gonna try gl3w. does opengl loader generator work for any of you?

here is my code. if you see a problem please let me know:

Code :
#include "gl_core_4_3.h"
#include <GL/gl.h>
#include <GL/freeglut.h>
#include <GL/glu.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
 
 
GLuint vao, buffer;
 
void init();
void display();
 
int main(int argc, char **argv){
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGBA);
    glutInitWindowSize(512,512);
    glutInitContextVersion(4,3);
    glutInitContextProfile(GLUT_CORE_PROFILE);
 
    glutCreateWindow("first opengl program");
 
      if(ogl_LoadFunctions() == ogl_LOAD_FAILED)
      {
        printf("error with GLEW");
        exit(1);
      }
 
 
      init();
 
 
    glutDisplayFunc(display);
    glutMainLoop();
 
    return 0;
 
}
 
void init()
{
	    glGenVertexArrays(1, &vao);
	    glBindVertexArray(vao);
 
	    GLfloat vertices[] = {
	    		-0.90, -0.90,
	    		0.85, -0.90,
	    		-0.90, 0.85,
	    		0.90, -0.85,
	    		0.90, 0.90,
	    		-0.85, 0.90
	    };
	    glGenBuffers(1, &buffer);
	    glBindBuffer(GL_ARRAY_BUFFER, buffer);
	    glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
 
	    const char fshader[] =
	    	    		"#version 430 core\n"
	    	    		"out vec4 fColor;\n"
	    	    		"void main()\n"
	    	    		"{\n"
	    	    		"fColor = vec4 (0.0, 0.0, 1.0, 1.0);\n"
	    	    		"}\n";
 
	    	const char vshader[] =
	    	    		"#version 430 core\n"
	    	    		"layout (location = 0) in vec4 vPosition;\n"
	    	    		"void main()\n"
	    	    		"{\n"
	    	    		"gl_Position = vPosition;\n"
	    	    		"}\n";
 
	    		GLuint prog = glCreateProgram();
 
	    	    GLuint vert = glCreateShader(GL_VERTEX_SHADER);
	    	    GLuint frag = glCreateShader(GL_FRAGMENT_SHADER);
 
	    	    GLint vlen = (GLint)strlen(vshader);
	    	    GLint flen = (GLint)strlen(fshader);
 
	    	    glShaderSource(vert, 1, &vshader, &vlen);
	    	    glShaderSource(frag, 1, &fshader, &flen);
	    	    glCompileShader(vert);
	    	    glCompileShader(frag);
 
 
	    	    glAttachShader(prog, vert);
	    	    glAttachShader(prog, frag);
	    	    glLinkProgram(prog);
	    	    glUseProgram(prog);
 
	    glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0,(void *)0);
	    glEnableVertexAttribArray(0);
}
 
void display()
{
	glClear(GL_COLOR_BUFFER_BIT);
 
	glBindVertexArray(vao);
	glDrawArrays(GL_TRIANGLES, 0, 6);
 
	glFlush();
}

thanks.