Linker Error Undefined Reference To Glutinit
Contents |
here for a quick overview of the site Help Center Detailed answers
Undefined Reference To Glutinit' Ubuntu
to any questions you might have Meta Discuss the workings undefined reference to __glutinitwithexit' and policies of this site About Us Learn more about Stack Overflow the company Business
Undefined Reference To Glutinit Code Blocks
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack undefined reference to glclearcolor@16' Overflow 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 Ubuntu 13.10 C++ OpenGL GLUT - linking issues - undefined reference to `glClearColor' up vote 7 down vote favorite 3 I am running Ubuntu undefined reference to `glcolor3f' 13.10 and trying to compile that portion of sample OpenGL code: #include "GL/freeglut.h" #include "GL/gl.h" /* 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/o
here for a quick overview of the site Help Center Detailed answers to
Glfw Undefined Reference To Glclear
any questions you might have Meta Discuss the workings and undefined reference to glend policies of this site About Us Learn more about Stack Overflow the company Business Learn more
Undefined Reference To Symbol 'glmatrixmode'
about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community http://stackoverflow.com/questions/21244712/ubuntu-13-10-c-opengl-glut-linking-issues-undefined-reference-to-glclearc 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 OpenGL/glut/stdc++ build errors up vote 4 down vote favorite I'm using Ubuntu and tried using synaptic to install everything that had the word "GLUT" in it and also http://stackoverflow.com/questions/5410832/opengl-glut-stdc-build-errors SDL and opengl . But still a simple program fails to compile . It shows this : opengl1.cpp:(.text+0xe): undefined reference to `glClear' opengl1.cpp:(.text+0x1a): undefined reference to `glBegin' opengl1.cpp:(.text+0x2e): undefined reference to `glVertex2i' opengl1.cpp:(.text+0x33): undefined reference to `glEnd' opengl1.cpp:(.text+0x38): undefined reference to `glFlush' /tmp/ccnwQeLu.o: In function `MyInit()': opengl1.cpp:(.text+0x4c): undefined reference to `glGetString' opengl1.cpp:(.text+0x57): undefined reference to `std::cout' opengl1.cpp:(.text+0x5c): undefined reference to `std::basic_ostream >& std::operator >(std::basic_ostream >&, unsigned char const*)' opengl1.cpp:(.text+0x6c): undefined reference to `std::basic_ostream >& std::operator >(std::basic_ostream >&, char const*)' opengl1.cpp:(.text+0x78): undefined reference to `glGetString' opengl1.cpp:(.text+0x83): undefined reference to `std::cout' opengl1.cpp:(.text+0x88): undefined reference to `std::basic_ostream >& std::operator >(std::basic_ostream >&, unsigned char const*)' opengl1.cpp:(.text+0x98): undefined reference to `std::basic_ostream >& std::operator >(std::basic_ostream >&, char const*)' opengl1.cpp:(.text+0xc0): undefined reference to `glClearColor' opengl1.cpp:(.text+0xdf): undefined reference to `glColor3f' opengl1.cpp:(.text+0xec): undefined reference to `glPointSize' opengl1.cpp:(.text+0xf8): undefined reference to `glMatrixMode' opengl1.cpp:(.text+0xfd): undefined reference to `glLoadIdentity' opengl1.cpp:(.text+0x12d): undefined reference to `gluOrtho2D' /tmp/ccnwQeLu.o: In function `main': opengl1.cpp:(.text+0x14a): undefined reference to `glutInit' opengl1.cp
here for a quick overview of the site Help Center Detailed answers to any questions http://stackoverflow.com/questions/15203577/freeglut-linking-issues-in-linux you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn 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 Community Stack Overflow is undefined reference a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up FreeGLUT linking Issues in Linux up vote 4 down vote favorite 1 I am running Linux Mint 14.1 64-bit I have installed the following libs: mesa-common-dev, freeglut3-dev, libglew-dev through the apt-get tool. undefined reference to Here are my includes, located in my Main.h file: #include