using opengl in VC++ win32 console application

I have GLUT library  in my vc++ console application... as i want to use glepolycylinder function I also added GLE.h...but  the application shows error as following

Error      4      error LNK2019: unresolved external symbol _glePolyCylinder referenced in function "void __cdecl display(void)" (?display@@YAXXZ)

Is  there any procedure to install GLE in my GLUT librray........

#include<iostream>	
#include<conio.h>
#include<stdlib.h>
#include <GL\glut.h>
#include "GL\glui.h"
#include"GL\gle.h"
 
#define NPTS 6
double points [NPTS][3];
float colors [NPTS][3];
int idx = 0;
 
 
GLfloat diffuseMaterial[4] = { 0.5, 0.5, 0.5, 1.0 };
	float x = 0.5,y = 0.5,z = 0.5;
int angle = 0;
 
/* some utilities for filling that array */
#define PNT(x,y,z) { 			\
   points[idx][0] = x; 			\
   points[idx][1] = y; 			\
   points[idx][2] = z;			\
   idx ++;				\
}
 
#define COL(r,g,b) { 			\
   colors[idx][0] = r; 			\
   colors[idx][1] = g; 			\
   colors[idx][2] = b;			\
}
 
/* 
 * Initialize a bent shape with three segments. 
 * The data format is a polyline.
 *
 * NOTE that neither the first, nor the last segment are drawn.
 * The first & last segment serve only to determine that angle 
 * at which the endcaps are drawn.
 */
 
 
 
/* draw the cylinder shape */
 
 
 
 
void init(void)
{
	glClearColor (0.0, 0.0, 0.0, 0.0);
	
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };
 
glShadeModel (GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuseMaterial);
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialf(GL_FRONT, GL_SHININESS, 25.0);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glColorMaterial(GL_FRONT, GL_DIFFUSE);
glEnable(GL_COLOR_MATERIAL);
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
 //initialize the join style here */
   gleSetJoinStyle (1);
 
   COL (0.0, 0.0, 0.0);
   PNT (-6.0, 6.0, 0.0);
 
   COL (0.0, 0.8, 0.3);
   PNT (6.0, 6.0, 0.0);
 
   COL (0.8, 0.3, 0.0);
   PNT (6.0, -6.0, 0.0);
 
   COL (0.2, 0.3, 0.9);
   PNT (-6.0, -6.0, 0.0);
 
   COL (0.2, 0.8, 0.5);
   PNT (-6.0, 6.0, 0.0);
 
   COL (0.0, 0.0, 0.0);
   PNT (6.0, 6.0, 0.0);
}
 
void display(void)
{
GLUquadricObj *quadratic;
	quadratic = gluNewQuadric();
	
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glColor3f(0.0,1.0,0.0);
 
 
glBegin( GL_LINES );
 
glColor3f( 1.f, 0.f, 0.f ); // Sets current primary color to red
glVertex3f( 0.f, 0.f, 0.f ); // Specify three vertices
glVertex3f( 4.f, 0.f, 0.f );
 
glColor3f( 0.f, 1.f, 0.f ); // Sets current primary color to Green
glVertex3f( 0.f, 0.f, 0.f ); // Specify three vertices
glVertex3f( 0.f, 4.f, 0.f );
 
glColor3f( 0.f, 0.f, 1.f ); // Sets current primary color to Blue
glVertex3f( 0.f, 0.f, 0.f ); // Specify three vertices
glVertex3f( 0.f, 0.f, 4.f );
 
glColor3f( 1.f, 0.f, 1.f ); // Sets current primary color to Magenta
glVertex3f( 0.f, 0.f, 0.f ); // Specify three vertices
glVertex3f( 1.f, 1.f, 1.f );
 
glEnd();
 
glBegin( GL_LINES );
glColor3f( 1.f, 1.f, 1.f ); // Sets current primary color to white
//glRotatef(45,0,1,0);
//glRotatef(-45,1,0,0);
glVertex3f( 0.f, 0.f, 0.f ); // Specify two vertices
glVertex3f( 1.5f, 1.5f, 0.f );
glEnd();
 
glLoadIdentity();
 
  /* Phew. FINALLY, Draw the polycylinder  -- */
   glePolyCylinder (NPTS, points, colors, 2.3);
 
	glutSwapBuffers();
}
void reshape (int w, int h)
{
glViewport(0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (w <= h)
glOrtho(-2.5, 2.5, -2.5*(GLfloat)h/(GLfloat)w,
2.5*(GLfloat)h/(GLfloat)w, -10.0, 10.0);
else
glOrtho(-2.5*(GLfloat)w/(GLfloat)h,
2.5*(GLfloat)w/(GLfloat)h, -2.5, 2.5, -10.0, 10.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}
 
 
int main(int argc, char **argv)
 
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (640, 480);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMainLoop();
return 0;
}

Open in new window

jsbsudhaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Are you linking with 'gle.lib'?
0
jkrCommented:
BTW, you can get that from http://www.linas.org/gle - usually, that is. Currently, I cannot load that page.
0
jsbsudhaAuthor Commented:
No I am not linking with GLE librray...... what is the procedure to install........I will look into your link.......0please wait
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

jsbsudhaAuthor Commented:
your link is not working.......I just added header fie GLE.h in the GL directory.
0
ikeworkCommented:
go to "project-settings" / "linker" and add gle.lib to the input librarys. then your programm can be linked with gle ..
0
ikeworkCommented:
including the header file is not linking .. did you install gle?
0
jkrCommented:
>>your link is not working

Well, I mentioned that. But, since you have a gle.h, you should have a gle.lib from the same archive. Just add that to your project using either

#pragma comment(lib,"gle.lib")

or go to "Project", "Add Existing Item", change teh extension to "*.lib", navigate to gle.lib and select it.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ikeworkCommented:
here is how you install it properly:

http://www.gle-graphics.org/tut/windows.html

0
ikeworkCommented:
0
jkrCommented:
Since the asker already has the header file, the matching library should be there also. Otherwise, even more would go wrong.
0
ikeworkCommented:
>> No I am not linking with GLE librray...... what is the procedure to install..Otherwise, even more would go wrong.

asker did not seem to know if he/she installed ot not ..
0
jsbsudhaAuthor Commented:
Thank you ...I have solved the errors by linking the GLE librray...........
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.