I have a code like this
// Car.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <math.h>
#include <GL/glut.h>
#include "glm.h"
using namespace std;
GLMmodel* pmodel1 = NULL;
void draw(){
if (!pmodel1) {
//pmodel1 = glmReadOBJ("glass.obj");
if (!pmodel1) exit(0);
// glmFacetNormals(pmodel1);
//glmVertexNormals(pmodel1, 90.0);
}
glmDraw(pmodel1, GLM_SMOOTH| GLM_TEXTURE);
}
void init(void)
{
glClearColor (0.0, 0.0, 0.0, 0.0);
glEnable(GL_DEPTH_TEST);
glShadeModel (GL_SMOOTH);
}
void changeSize(int w, int h) {
if(h == 0) h = 1;
float ratio = 1.0* w / h;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0, 0, w, h);
gluPerspective(25, ratio, 1, 1000);
glMatrixMode(GL_MODELVIEW);
}
void renderScene(){
}
void keyboard(unsigned char key, int x, int y){
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(800,600);
glutCreateWindow("Oday&Khader project");
init ();
glutDisplayFunc(renderScene);
glutKeyboardFunc(keyboard);
glutIdleFunc(renderScene);
glutReshapeFunc(changeSize);
glutMainLoop();
return 0;
}
i used to train my self about using glm libary
but the code give me an error and i try many ways to correct without any benefit.
Error 1 error LNK2019: unresolved external symbol "void __cdecl glmDraw(struct _GLMmodel *,unsigned int)" (?glmDraw@@YAXPAU_GLMmodel@@I@Z) referenced in function "void __cdecl draw(void)" (?draw@@YAXXZ) Car.obj Car
I use visual studio 2008 and i insert glm.h and glm.cpp in the file's project.
please, help me if any one can
and thanks in advance