Here is the source c++
// Include standard headers
#include <stdio.h>
#include <stdlib.h>
// Include GLEW
#include <GL/glew.h>
// Include GLFW
#include <GL/glfw3.h>
// Include GLM
#include <glm/glm.hpp>
using namespace glm;
int main( void )
{
// Initialise GLFW
if( !glfwInit() )
{
fprintf( stderr, "Failed to initialize GLFW
" );
return -1;
}
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);
// Open a window and create its OpenGL context
if( !glfwOpenWindow( 1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW ) )
{
fprintf( stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.
" );
glfwTerminate();
return -1;
}
// Initialize GLEW
if (glewInit() != GLEW_OK) {
fprintf(stderr, "Failed to initialize GLEW
");
return -1;
}
glfwSetWindowTitle( "Tutorial 01" );
// Ensure we can capture the escape key being pressed below
glfwEnable( GLFW_STICKY_KEYS );
// Dark blue background
glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
do{
// Draw nothing, see you in tutorial 2 !
// Swap buffers
glfwSwapBuffers();
} // Check if the ESC key was pressed or the window was closed
while( glfwGetKey( GLFW_KEY_ESC ) != GLFW_PRESS &&
glfwGetWindowParam( GLFW_OPENED ) );
// Close OpenGL window and terminate GLFW
glfwTerminate();
return 0;
}
ERRORS
bcc32 -D_DEBUG -g100 -j25 -Od -r- -k -y -v -vi- -tWC -c -IC:\CBuilderX\include -o"C:\Documents and Settings\Jari\cbproject\ConsoleApp3\windows\Debug_Build\OpenGL-tutorial_v0012_33 utorial01_first_window utorial01.obj" …\OpenGL-tutorial_v0012_33 utorial01_first_window utorial01.cpp
Borland C++ 5.6.4 for Win32 Copyright © 1993, 2002 Borland
…\OpenGL-tutorial_v0012_33 utorial01_first_window utorial01.cpp:
“glew.h”: E2238 Multiple declaration for ‘ptrdiff_t’ at line 168
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 33
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 33
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 33
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 33
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 34
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 34
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 34
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm2x16(const mediump_vec2 &) at line 34
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 81
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 81
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 81
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 81
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 82
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 82
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 82
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 82
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 83
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 83
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 83
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 83
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 84
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 84
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 84
“func_packing.inl”: E2406 Dependent type qualifier ‘float’ is not a class or struct type in function packUnorm4x8(const mediump_vec4 &) at line 84
“func_packing.inl”: E2228 Too many error or warning messages in function packUnorm4x8(const mediump_vec4 &) at line 84
*** 26 errors in Compile ***
BCC32 exited with error code: 1
Build cancelled due to errors
Please help