Linker Error Undefined Reference To Glbegin
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might undefined reference to glutinit' ubuntu have Meta Discuss the workings and policies of this site About
Undefined Reference To Glutinit Code Blocks
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting undefined reference to __glutinitwithexit' ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million
Undefined Reference To Glclearcolor@16'
programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ubuntu 13.10 C++ OpenGL GLUT - linking issues - undefined reference to `glClearColor' up vote 7 down vote favorite 3 I am running Ubuntu 13.10 and trying to compile that portion of sample OpenGL code: #include "GL/freeglut.h" #include "GL/gl.h" undefined reference to glend /* display function - code from: http://fly.cc.fer.hr/~unreal/theredbook/chapter01.html This is the actual usage of the OpenGL library. The following code is the same for any platform */ void renderFunction() { glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); glBegin(GL_POLYGON); glVertex2f(-0.5, -0.5); glVertex2f(-0.5, 0.5); glVertex2f(0.5, 0.5); glVertex2f(0.5, -0.5); glEnd(); glFlush(); } /* Main method - main entry point of application the freeglut library does the window creation work for us, regardless of the platform. */ int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE); glutInitWindowSize(500,500); glutInitWindowPosition(100,100); glutCreateWindow("OpenGL - First window demo"); glutDisplayFunc(renderFunction); glutMainLoop(); return 0; } I've used Eclipse to build the project, however it fails on linking level: Building target: opengl_test Invoking: GCC C++ Linker g++ -L/usr/lib -L/usr/lib/fglrx -L/usr/lib/x86_64-linux-gnu -L/usr/lib/i386-linux-gnu/mesa -L/usr/lib/x86_64-linux-gnu/mesa -o "opengl_test" ./src/opengl_test.o ./src/opengl_test.o: In function `renderFunction()': /var/www/opengl_test/Debug/../src/opengl_test.cpp:10: undefined reference to `glClearColor' /var/www/opengl_test/Debug/../src/opengl_test.cpp:11: undefined reference to `glClear' /var/www/opengl_test/Debug/../src/opengl_test.cpp:12: undefined reference to `glColor3f' /var/www/opengl_test/Debug/../src/opengl_test.cpp:13: undefined reference to `glOrtho' /var/www/opengl_test/Debug/../src/opengl_test.cpp:14: undefined reference to `glBegin' /var/www/opengl_test/Debug/../src/opengl_test.cpp:15: undefined reference to `glVer
here for a quick overview of the site Help Center Detailed answers to any
Glfw Undefined Reference To Glclear
questions you might have Meta Discuss the workings and policies
Undefined Reference To `glcolor3f'
of this site About Us Learn more about Stack Overflow the company Business Learn more about undefined reference to `glewinit' hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow http://stackoverflow.com/questions/21244712/ubuntu-13-10-c-opengl-glut-linking-issues-undefined-reference-to-glclearc is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error with GLUT compile in ubuntu [duplicate] up vote 7 down vote favorite 4 This question already has an answer here: What is an undefined reference/unresolved external symbol error and http://stackoverflow.com/questions/8352176/error-with-glut-compile-in-ubuntu how do I fix it? 25 answers I try to compile some "hello world" glut application: #include
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/23228208/i-cannot-compile-an-opengl-application-due-to-library-issues to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn http://www.thehelper.net/threads/getting-linker-errors-in-dev-c.99390/ more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow undefined reference Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up I cannot compile an OpenGL application due to library issues up vote 0 down vote favorite I am having alot of trouble compiling any simple undefined reference to OpenGL application in c++. I have been looking around and have mostly seen that the problem is linking, but i haven't been able to find a solution that works for me. I have added MinGW to the Path and also moved the freeglut and glut libraries and headers over. I have used a simple openGL tutorial example and its supposed to draw a white line in a black box. Here is my code: #include
Activity What's New? Help Forums Forums Quick Links Search Forums Recent Posts Shoutbox Shoutbox Quick Links Full View Popup Members Members Quick Links Notable Members Current Visitors Recent Activity Menu The Helper Home Forums > Technical Support Zone > General Programming Support > Ads by Project Wonderful! Your ad here, right now: $0 Getting linker errors in dev-c++ Discussion in 'General Programming Support' started by Samael88, Nov 27, 2008. Samael88 Evil always finds a way I wanted to start working with openGL, just to try it out. I downloaded the files nessecary, I have googled for a while to find out where to put them. I only find VC++ tutorials. I don't get those really. I get a lot of linker errors when trying to compile my tutorial progam, any GL program for that matter And I just can't firgure out what to do. I really think it has to do with these files: glut.h glut.lib glut32.lib glut.dll glut32.dll glut.h I got figured out. no prob there. the .dll files have been put in windows, system and system32 dirs. the lib files have been set as parameters in the project options. That is about what the tutorial tells me and the rest of the web. Why does it not work? +rep for helpers:thup: Samael88, Nov 27, 2008 #1 TheDamien _ Why don't you post the error messages in this thread? By the way, your libraries should be .a, not .lib. TheDamien, Nov 27, 2008 #2 enouwee Non ex transverso sed deorsum You have told your IDE to link against these libraries? GCC/G++ syntax: -lglut enouwee, Nov 28, 2008 #3 Like x 1 Samael88 Evil always finds a way TheDamien said: ↑ Why don't you post the error messages in this thread? By the way, your libraries should be .a, not .lib.Click to expand... I have used .libs before. These just don't seem to work But I will try getting them as .a files, if that is even possibl