Advertisement

03.31.2008 at 10:34AM PDT, ID: 23283295
[x]
Attachment Details

GLSL & Visual Studio compile problem

Asked by Koraxen in OpenGL Graphics & Game Programming, 3D Game Programming, Microsoft Visual C++

Tags: GLSL

Hi guys,

I'm taking a computer graphics course, but am having trouble compiling the base assignment code (GLSL) under Visual Studio 2005. I cannot proceed until I get the GLSL portion compiling correctly.
http://www.cs.rit.edu/~jmg/shader/labs/lab1/lab1.zip

The only change that I made to the original source within that archive was changing "#include <OPENGL/glut.h>" (MAC only), to "#include <GL/glut.h>" (to get Windows to recognize it).

OpenGL is installed correctly because I can successfully compile & run all the following GLSL application/shader examples:
http://www.lighthouse3d.com/opengl/glsl/index.php?shaders

Visual Studio's error output is shown in the code snippet, please help!

Thanks a bunch!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(29) : warning C4996: 'fopen' was declared deprecated
1>        c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
1>        Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(39) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(57) : warning C4996: 'fopen' was declared deprecated
1>        c:\program files (x86)\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
1>        Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(78) : error C2065: 'GL_INFO_LOG_LENGTH' : undeclared identifier
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(78) : error C3861: 'glGetShaderiv': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(83) : error C3861: 'glGetShaderInfoLog': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(95) : error C3861: 'glGetProgramiv': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(100) : error C3861: 'glGetProgramInfoLog': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(121) : error C2065: 'GL_VERTEX_SHADER' : undeclared identifier
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(121) : error C3861: 'glCreateShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(122) : error C2065: 'GL_FRAGMENT_SHADER' : undeclared identifier
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(122) : error C3861: 'glCreateShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(139) : error C3861: 'glShaderSource': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(140) : error C3861: 'glShaderSource': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(145) : error C3861: 'glCompileShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(146) : error C3861: 'glCompileShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(151) : error C3861: 'glCreateProgram': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(152) : error C3861: 'glAttachShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(153) : error C3861: 'glAttachShader': identifier not found
1>c:\users\korax\desktop\lab1\lab1\glsl\shadersetup.cpp(157) : error C3861: 'glLinkProgram': identifier not found
[+][-]03.31.2008 at 11:32AM PDT, ID: 21247857

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.31.2008 at 03:25PM PDT, ID: 21249710

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.31.2008 at 09:09PM PDT, ID: 21251206

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.01.2008 at 11:05AM PDT, ID: 21256504

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.01.2008 at 11:38AM PDT, ID: 21256772

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: OpenGL Graphics & Game Programming, 3D Game Programming, Microsoft Visual C++
Tags: GLSL
Sign Up Now!
Solution Provided By: ikework
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.01.2008 at 12:47PM PDT, ID: 21257435

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.01.2008 at 01:03PM PDT, ID: 21257606

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 08:27PM PDT, ID: 21278862

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.03.2008 at 08:29PM PDT, ID: 21278875

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.05.2008 at 07:48AM PDT, ID: 21288319

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628