OS:ubuntu 12.04 Lts
IDE:CodeBlocks
im trying to include math_3d.h in my glew/freeglut project and seem to be having some issues
at first attempt to include it i got “no such file or directory”
so then i google and found a math_3d to include
svn-history/r75/trunk/tutorial36/math_3d.h (<–bing or google that. new users cant post links)
after including this file it just returned many errors
/home/dark_ninjuh/Desktop/l/main.c|1|warning: extra tokens at end of #ifndef directive [enabled by default]|
/home/dark_ninjuh/Desktop/l/math_3d.h|41|error: expected specifier-qualifier-list before ‘Vector2f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|59|error: expected specifier-qualifier-list before ‘Vector3f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|117|error: expected specifier-qualifier-list before ‘Vector4f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|135|error: unknown type name ‘Vector3f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|135|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘+’ token|
/home/dark_ninjuh/Desktop/l/math_3d.h|144|error: unknown type name ‘Vector3f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|144|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘-’ token|
/home/dark_ninjuh/Desktop/l/math_3d.h|153|error: unknown type name ‘Vector3f’|
/home/dark_ninjuh/Desktop/l/math_3d.h|153|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token|
/home/dark_ninjuh/Desktop/l/math_3d.h|171|error: unknown type name ‘class’|
/home/dark_ninjuh/Desktop/l/math_3d.h|172|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token|
/home/dark_ninjuh/Desktop/l/math_3d.h|250|error: expected specifier-qualifier-list before ‘Quaternion’|
/home/dark_ninjuh/Desktop/l/math_3d.h|257|error: unknown type name ‘Quaternion’|
/home/dark_ninjuh/Desktop/l/math_3d.h|257|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token|
/home/dark_ninjuh/Desktop/l/math_3d.h|259|error: unknown type name ‘Quaternion’|
/home/dark_ninjuh/Desktop/l/math_3d.h|259|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘*’ token|
/home/dark_ninjuh/Desktop/l/main.c|1|error: unterminated #ifndef|
/home/dark_ninjuh/Desktop/l/main.c||In function ‘main’
/home/dark_ninjuh/Desktop/l/main.c|27|warning: control reaches end of non-void function [-Wreturn-type]|
||=== Build finished: 17 errors, 2 warnings ===|
here is my main source if it helps:
#ifndef LOPENGL_H #define LOPENGL_H
#include <stdio.h>
#include <GL/glew.h>
#include <GL/freeglut.h>
#include “math_3d.h”
void display (void) {
glClearColor(1.0f, 0.0f, 0.0f, 1.0f); // Clear the background of our window to red
glClear(GL_COLOR_BUFFER_BIT); //Clear the colour buffer (more buffers later on)
glLoadIdentity(); // Load the Identity Matrix to reset our drawing locations
glFlush(); // Flush the OpenGL buffers to the window
}
int main (int argc, char **argv) {
glutInit(&argc, argv); // Initialize GLUT
glutInitDisplayMode (GLUT_SINGLE); // Set up a basic display buffer (only single buffered for now)
glutInitWindowSize (500, 500); // Set the width and height of the window
glutInitWindowPosition (100, 100); // Set the position of the window
glutCreateWindow (“Your first OpenGL Window”); // Set the title for the window
glutDisplayFunc(display); // Tell GLUT to use the method “display” for rendering
glutMainLoop(); // Enter GLUT’s main loop
}
any guidence in the right direction is appreciated