FANDOM


Debug gleCreateShader Edit

Search for include file Edit

  • Full Error Message
 $ cd ~/usr/datenwolf/Tut\ 01\ Hello\ Triangle/
Linking Tut 01 Main
obj/Debug/tut1.o: In function `CreateShader(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:16: undefined reference to `__gleCreateShader'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:18: undefined reference to `__gleShaderSource'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:20: undefined reference to `__gleCompileShader'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:23: undefined reference to `__gleGetShaderiv'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:27: undefined reference to `__gleGetShaderiv'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:30: undefined reference to `__gleGetShaderInfoLog'
obj/Debug/tut1.o: In function `CreateProgram(std::vector<unsigned int, std::allocator<unsigned int> > const&)':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:49: undefined reference to `__gleCreateProgram'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:52: undefined reference to `__gleAttachShader'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:54: undefined reference to `__gleLinkProgram'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:57: undefined reference to `__gleGetProgramiv'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:61: undefined reference to `__gleGetProgramiv'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:64: undefined reference to `__gleGetProgramInfoLog'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:70: undefined reference to `__gleDetachShader'
obj/Debug/tut1.o: In function `InitializeProgram()':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:104: undefined reference to `__gleDeleteShader'
obj/Debug/tut1.o: In function `InitializeVertexBuffer()':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:119: undefined reference to `__gleGenBuffers'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:121: undefined reference to `__gleBindBuffer'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:122: undefined reference to `__gleBufferData'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:123: undefined reference to `__gleBindBuffer'
obj/Debug/tut1.o: In function `init()':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:132: undefined reference to `__gleGenVertexArrays'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:133: undefined reference to `__gleBindVertexArray'
obj/Debug/tut1.o: In function `display()':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:141: undefined reference to `__gleClearColor'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:142: undefined reference to `__gleClear'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:144: undefined reference to `__gleUseProgram'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:146: undefined reference to `__gleBindBuffer'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:147: undefined reference to `__gleEnableVertexAttribArray'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:148: undefined reference to `__gleVertexAttribPointer'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:150: undefined reference to `__gleDrawArrays'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:152: undefined reference to `__gleDisableVertexAttribArray'
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:153: undefined reference to `__gleUseProgram'
obj/Debug/tut1.o: In function `reshape(int, int)':
/home/darren/usr/datenwolf/Tut 01 Hello Triangle/tut1.cpp:162: undefined reference to `__gleViewport'
../framework/lib/libframeworkD.a(framework.o): In function `Framework::LoadShader(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/darren/usr/datenwolf/framework/framework.cpp:37: undefined reference to `glutil::CompileShader(unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../framework/lib/libframeworkD.a(framework.o): In function `Framework::CreateProgram(std::vector<unsigned int, std::allocator<unsigned int> > const&)':
/home/darren/usr/datenwolf/framework/framework.cpp:50: undefined reference to `glutil::LinkProgram(std::vector<unsigned int, std::allocator<unsigned int> > const&, bool)'
/home/darren/usr/datenwolf/framework/framework.cpp:51: undefined reference to `__gleDeleteShader'
/home/darren/usr/datenwolf/framework/framework.cpp:56: undefined reference to `__gleDeleteShader'
../framework/lib/libframeworkD.a(framework.o): In function `main':
/home/darren/usr/datenwolf/framework/framework.cpp:163: undefined reference to `__gleEnable'
collect2: error: ld returned 1 exit status
Makefile:85: recipe for target 'Tut 01 MainD' failed
make: *** [Tut 01 MainD] Error 1
* Search for symbol

$ cd /usr/include/GL

$ grep -r CreateShader *


glcorearb.h:GLAPI GLuint APIENTRY glCreateShader (GLenum type);
glcorearb.h:GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
glew.h:#define glCreateShader GLEW_GET_FUN(__glewCreateShader)
glew.h:#define glCreateShaderProgramv GLEW_GET_FUN(__glewCreateShaderProgramv)
glew.h:#define glCreateShaderObjectARB GLEW_GET_FUN(__glewCreateShaderObjectARB)
glew.h:#define glCreateShaderProgramEXT GLEW_GET_FUN(__glewCreateShaderProgramEXT)
glew.h:GLEW_FUN_EXPORT PFNGLCREATESHADERPROC __glewCreateShader;
glew.h:GLEW_FUN_EXPORT PFNGLCREATESHADERPROGRAMVPROC __glewCreateShaderProgramv;
glew.h:GLEW_FUN_EXPORT PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB;
glew.h:GLEW_FUN_EXPORT PFNGLCREATESHADERPROGRAMEXTPROC __glewCreateShaderProgramEXT;
glext.h:GLAPI GLuint APIENTRY glCreateShader (GLenum type);
glext.h:GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings);
glext.h:GLAPI GLhandleARB APIENTRY glCreateShaderObjectARB (GLenum shaderType);
glext.h:GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *string);
gl_mangle.h:#define glCreateShader        MANGLE(CreateShader)
gl_mangle.h:#define glCreateShaderObjectARB        MANGLE(CreateShaderObjectARB)
gl_mangle.h:#define glCreateShaderProgramEXT        MANGLE(CreateShaderProgramEXT)
gl_mangle.h:#define glCreateShaderProgramv        MANGLE(CreateShaderProgramv)

  • Should be linking to glew?
  • seems to be some installation issue?
  • rebuild glsdk
cd ~/usr/glsdk_0_5_2
premake4 gmake
make
    • SUCCESS
  • make examples
cd examples
premake4 gmake
make
  • run examples
$ simple_glut/simple_glutD
$ simple_glfw/simple_glfwD
$ font_test/font_testD
    • All OK
  $ caustics/causticsD
    • FAIL
 loading caustics: 0
 caust00.bw: could not load image file
  • check Tut01 makefile for reference to glsdk_0_5_2
 $ cd ~/usr/datenwolf/Tut 01 Hello Triangle
 $ grep -n glsdk_0_5_2 Makefile 
 27:  INCLUDES  += -I../framework -I../../glsdk_0_5_2/glutil/include -I../../glsdk_0_5_2/glm -I../../glsdk_0_5_2/freeglut/include -I../../glsdk_0_5_2/glmesh/include -I../../glsdk_0_5_2/boost -I../../glsdk_0_5_2/glimg/include -I../../glsdk_0_5_2/glload/include
 31:  LDFLAGS   += -L../../glsdk_0_5_2/glutil/lib -L../../glsdk_0_5_2/freeglut/lib -L../../glsdk_0_5_2/glmesh/lib -L../../glsdk_0_5_2/glimg/lib -L../../glsdk_0_5_2/glload/lib -L../framework/lib
 49:  INCLUDES  += -I../framework -I../../glsdk_0_5_2/glutil/include -I../../glsdk_0_5_2/glm -I../../glsdk_0_5_2/freeglut/include -I../../glsdk_0_5_2/glmesh/include -I../../glsdk_0_5_2/boost -I../../glsdk_0_5_2/glimg/include -I../../glsdk_0_5_2/glload/include
 53:  LDFLAGS   += -s -L../../glsdk_0_5_2/glutil/lib -L../../glsdk_0_5_2/freeglut/lib -L../../glsdk_0_5_2/glmesh/lib -L../../glsdk_0_5_2/glimg/lib -L../../glsdk_0_5_2/glload/lib -L../framework/lib
  • Libraries
53:  LDFLAGS   += -s
 -L../../glsdk_0_5_2/glutil/lib
 -L../../glsdk_0_5_2/freeglut/lib
 -L../../glsdk_0_5_2/glmesh/lib
 -L../../glsdk_0_5_2/glimg/lib
 -L../../glsdk_0_5_2/glload/lib
 -L../framework/lib


  • inspect glutil
   $ cd ~/usr/glsdk_0_5_2/glutil/lib
   $ ls
libglutilD.a
  • build Release lib
$ cd ~/usr/glsdk_0_5_2/
$ make config=release
  • retry Tutorial
 $ cd ~/usr/datenwolf/Tut\ 01\ Hello\ Triangle/
 $ make
** FAIL


Websearch gleCreateShader Edit

* https://www.opengl.org/discussion_boards/archive/index.php/t-184883.html

Search for gleCreateShader Edit

* search Tutorial
 $ cd ~/usr/datenwolf
 $ grep -rn CreateShader *
framework/framework.h:17:	GLuint CreateShader(GLenum eShaderType,
glsdk/glload/source/gll_gl_ext.c:2569:PFNGLCREATESHADERPROGRAMVPROC __gleCreateShaderProgramv;
glsdk/glload/source/gll_gl_ext.c:2637:	__gleCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)gleIntGetProcAddress("glCreateShaderProgramv");
glsdk/glload/source/gll_gl_ext.c:2638:	if(!__gleCreateShaderProgramv) bIsLoaded = 0;
glsdk/glload/source/gll_gl_ext.c:2835:PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
glsdk/glload/source/gll_gl_ext.c:2883:	glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)gleIntGetProcAddress("glCreateShaderObjectARB");
glsdk/glload/source/gll_gl_ext.c:2884:	if(!glCreateShaderObjectARB) bIsLoaded = 0;
glsdk/glload/source/gll_gl_ext.c:6465:PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
glsdk/glload/source/gll_gl_ext.c:6476:	glCreateShaderProgramEXT = (PFNGLCREATESHADERPROGRAMEXTPROC)gleIntGetProcAddress("glCreateShaderProgramEXT");
glsdk/glload/source/gll_gl_ext.c:6477:	if(!glCreateShaderProgramEXT) bIsLoaded = 0;
glsdk/glload/source/gll_gl_ext.c:11439:PFNGLCREATESHADERPROC __gleCreateShader;
glsdk/glload/source/gll_gl_ext.c:12022:	__gleCreateShader = (PFNGLCREATESHADERPROC)gleIntGetProcAddress("glCreateShader");
glsdk/glload/source/gll_gl_ext.c:12023:	if(!__gleCreateShader) bIsLoaded = 0;
glsdk/glload/source/gll_gl_ext.c:13553:	__gleCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC)gleIntGetProcAddress("glCreateShaderProgramv");
glsdk/glload/source/gll_gl_ext.c:13554:	if(!__gleCreateShaderProgramv) bIsLoaded = 0;
glsdk/glload/glload.doxy:100:  GLuint vertShader = glCreateShader(GL_VERTEX_SHADER);
glsdk/glload/glload.doxy:101:  GLuint fragShader = glCreateShader(GL_FRAGMENT_SHADER);
glsdk/glload/glload.doxy:124:  GLuint vertShader = gl::CreateShader(gl::GL_VERTEX_SHADER);
glsdk/glload/glload.doxy:125:  GLuint fragShader = gl::CreateShader(gl::GL_FRAGMENT_SHADER);
glsdk/glload/include/glload/_int_gl_2_0.hpp:20:extern GLuint (GLE_FUNCPTR *__gleCreateShader)(GLenum );
glsdk/glload/include/glload/_int_gl_2_0.hpp:169:	inline GLuint CreateShader(GLenum type) { return ::__gleCreateShader(type); }
glsdk/glload/include/glload/_int_gl_2_0.h:167:extern PFNGLCREATESHADERPROC __gleCreateShader;
glsdk/glload/include/glload/_int_gl_2_0.h:168:#define glCreateShader __gleCreateShader
glsdk/glload/include/glload/_int_gl_exts.h:2346:extern PFNGLCREATESHADERPROGRAMVPROC __gleCreateShaderProgramv;
glsdk/glload/include/glload/_int_gl_exts.h:2347:#define glCreateShaderProgramv __gleCreateShaderProgramv
glsdk/glload/include/glload/_int_gl_exts.h:2680:extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
glsdk/glload/include/glload/_int_gl_exts.h:6220:extern PFNGLCREATESHADERPROGRAMEXTPROC glCreateShaderProgramEXT;
glsdk/glload/include/glload/_int_gl_exts.hpp:645:extern GLuint (GLE_FUNCPTR *__gleCreateShaderProgramv)(GLenum , GLsizei , const GLchar* *);
glsdk/glload/include/glload/_int_gl_exts.hpp:709:extern GLhandleARB (GLE_FUNCPTR *glCreateShaderObjectARB)(GLenum );
glsdk/glload/include/glload/_int_gl_exts.hpp:1422:extern GLuint (GLE_FUNCPTR *glCreateShaderProgramEXT)(GLenum , const GLchar *);
glsdk/glload/include/glload/_int_gl_exts.hpp:6845:	inline GLuint CreateShaderProgramv(GLenum type, GLsizei count, const GLchar* *strings) { return ::__gleCreateShaderProgramv(type, count, strings); }
glsdk/glload/include/glload/_int_gl_exts.hpp:6921:	inline GLhandleARB CreateShaderObjectARB(GLenum shaderType) { return ::glCreateShaderObjectARB(shaderType); }
glsdk/glload/include/glload/_int_gl_exts.hpp:7910:	inline GLuint CreateShaderProgramEXT(GLenum type, const GLchar *string) { return ::glCreateShaderProgramEXT(type, string); }
glsdk/glload/codegen/glspecs/glspec.lua:14720:				["name"] = [==[CreateShader]==],
glsdk/glload/codegen/glspecs/glspec.lua:24280:				["alias"] = [==[CreateShader]==],
glsdk/glload/codegen/glspecs/glspec.lua:24281:				["name"] = [==[CreateShaderObjectARB]==],
glsdk/glload/codegen/glspecs/glspec.lua:31126:				["name"] = [==[CreateShaderProgramv]==],
glsdk/glload/codegen/glspecs/glspec.lua:69755:				["name"] = [==[CreateShaderProgramEXT]==],
glsdk/glutil/source/Shader.cpp:78:		GLuint shader = gl::CreateShader(shaderType);
glsdk/glutil/source/Shader.cpp:89:		GLuint shader = gl::CreateShader(shaderType);
glsdk/glutil/source/Shader.cpp:102:		GLuint shader = gl::CreateShader(shaderType);
glsdk/glutil/source/Shader.cpp:124:		GLuint shader = gl::CreateShader(shaderType);
glsdk/glutil/source/Shader.cpp:315:		GLuint program = gl::CreateShaderProgramv(shaderType, 1, &shaderText);
glsdk/glutil/source/Shader.cpp:329:		GLuint program = gl::CreateShaderProgramv(shaderType, numStrings,
glsdk/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c:126:PFNGLCREATESHADERPROC gl_CreateShader;
glsdk/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c:148:   gl_CreateShader = (PFNGLCREATESHADERPROC) glutGetProcAddress ("glCreateShader");
glsdk/freeglut/progs/demos/smooth_opengl3/smooth_opengl3.c:239:   GLuint shader = gl_CreateShader (type);
html/Basics/Tut01 Making Shaders.html:18:    shaderList.push_back(CreateShader(GL_VERTEX_SHADER, strVertexShader));
html/Basics/Tut01 Making Shaders.html:19:    shaderList.push_back(CreateShader(GL_FRAGMENT_SHADER, strFragmentShader));
html/Basics/Tut01 Making Shaders.html:26:                <code class="function">CreateShader</code> function is a function defined by the tutorial
html/Basics/Tut01 Making Shaders.html:29:                <code class="function">CreateShader</code>:</p><div class="example"><a name="d0e1755"></a><p class="title"><b>Example 1.7. Shader Creation</b></p><div class="example-contents"><pre class="programlisting">GLuint CreateShader(GLenum eShaderType, <span class="code-keyword">const</span> std::string &strShaderFile)
html/Basics/Tut01 Making Shaders.html:31:    GLuint shader = glCreateShader(eShaderType);
html/Basics/Tut01 Making Shaders.html:61:            create the object with <code class="function">glCreateShader</code>. This function creates a
html/Basics/Tut01 In Review.html:43:                            width/height.</p></dd><dt>glCreateShader, glShaderSource, glCompileShader,
html/Basics/Tut01 In Review.html:45:                                <code class="function">glCreateShader</code> simply creates an empty shader
html/Basics/Tutorial 02.html:15:            previous tutorial's <code class="function">CreateShader</code> and
Tut 01 Hello Triangle/tut1.cpp:14:GLuint CreateShader(GLenum eShaderType, const std::string &strShaderFile)
Tut 01 Hello Triangle/tut1.cpp:16:	GLuint shader = glCreateShader(eShaderType);
Tut 01 Hello Triangle/tut1.cpp:99:	shaderList.push_back(CreateShader(GL_VERTEX_SHADER, strVertexShader));
Tut 01 Hello Triangle/tut1.cpp:100:	shaderList.push_back(CreateShader(GL_FRAGMENT_SHADER, strFragmentShader));
Binary file Tut 01 Hello Triangle/obj/Debug/tut1.o matches

Undo standalone glsdk Edit

  • remove GLSDK_PATH
    • $DATENWOLF/premake.lua file
- dofile("/home/darren/usr/glsdk_0_5_2/links.lua")

setup datenwolf gldsk Edit

  • premake
cd ~/usr/datenwolf
cd glsdk
premake4 gmake
  • build
make
    • seems to build only Debug
  • build
make release
  • check Makefile
  • help is built in
make help
  • build
make config=release
    • TONS of warnings, but seems to complete OK

Build Tutorial Edit

  • retry Tutorial
 cd ~/usr/datenwolf/
 cd Tut\ 01\ Hello\ Triangle/
 make
  • inspect Makefile
    • Still using glsdk_0_5_2
  • premake Tutorials
cd~/usr/datenwolf
premake4 gmake
  • retry Tutorial
 cd ~/usr/datenwolf/
 cd Tut\ 01\ Hello\ Triangle/
 make
  • SUCCESS
  • run
  • SUCCESS

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.