Something Is Wrong When Linking (dev-c++)

free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > C, C++ & Visual C++

Something Is Wrong When Linking (dev-c++)

Feelay
Hi!

I am trying to learn how to use OpenGL.
I am úsing a compiler named dev-c++.
I was following a very simple tutorial that would teach me how to make a simple window in OpenGL.
But I got a strange error.
So I tryed to find a tutorial that would teach me how to install GLUT, because the tutorial I was following, that teached me how to make a window, used GLUT. Anyways, I did whatthe tutorial told me to do, and that didn't work. So can anyone please tell me how I can install GLUT, and how to link everything etc, when working with OpenGL.
I hope you understand what I want tongue.gif and BTW.. here is what the linker executed:

QUOTE
c:\dev-c++\lib\untitled1.o(.text+0x17):untitled1.cpp: undefined reference to `__glutInitWithExit@12'
c:\dev-c++\lib\untitled1.o(.text+0x3b):untitled1.cpp: undefined reference to `__glutCreateWindowWithExit@8'
c:\dev-c++\lib\untitled1.o(.text+0x67):untitled1.cpp: undefined reference to `__glutCreateMenuWithExit@8'
c:\dev-c++\lib\untitled1.o(.text+0x9a):untitled1.cpp: undefined reference to `glClearColor@16'
c:\dev-c++\lib\untitled1.o(.text+0xa7):untitled1.cpp: undefined reference to `glClear@4'
c:\dev-c++\lib\untitled1.o(.text+0xaf):untitled1.cpp: undefined reference to `glLoadIdentity@0'
c:\dev-c++\lib\untitled1.o(.text+0xee):untitled1.cpp: undefined reference to `glFlush@0'
c:\dev-c++\lib\untitled1.o(.text+0x134):untitled1.cpp: undefined reference to `glutInitDisplayMode@4'
c:\dev-c++\lib\untitled1.o(.text+0x149):untitled1.cpp: undefined reference to `glutInitWindowSize@8'
c:\dev-c++\lib\untitled1.o(.text+0x158):untitled1.cpp: undefined reference to `glutInitWindowPosition@8'
c:\dev-c++\lib\untitled1.o(.text+0x178):untitled1.cpp: undefined reference to `glutDisplayFunc@4'
c:\dev-c++\lib\untitled1.o(.text+0x180):untitled1.cpp: undefined reference to `glutMainLoop@0'


Thanks //Feelay

 

 

 


Reply

Athlon1600
try putting this code at the top of the code:

CODE
# include <GL/gl.h>
# include <GL/glut.h>



I don't know much about this, I just googled you error and got this: very long link - click here

Reply

Feelay
thank you =) But my problem was that I couldn't install glut.

But I solved it. The solution was the following.
I tryed to follow this tutorial:
Installing Glut To Dev C++, A tutorial to install GLUT on Dev C++

I thought I had the version needed. But when I was on the step where I needed to go to an update button, I couldn't find it. But after some research, I recognized that I had an older version of Dev-C++. So I downloaded the newest beta release, and followed the tutorial again. Now it is working =)

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

Recent Queries:-
  1. glutinitdisplaymode@4 - 22.21 hr back. (2)
  2. dev c glut linker error - 148.84 hr back. (1)
  3. devc "undefined reference to" glutinitdisplaymode - 422.48 hr back. (1)
  4. dev-c tutorial - 557.57 hr back. (1)
  5. glutinitwindowposition devc - 569.00 hr back. (1)
  6. glclearcolor@16 - 577.57 hr back. (1)
  7. username in devcpp - 578.80 hr back. (1)
  8. devc fopen - 641.95 hr back. (1)
Similar Topics

Keywords : wrong, linking, dev, c,

  1. [c/c++][linux] Linking With A -l Is Static Or Dynamic?
    How will it effect distribution and portability? (0)


      Looking for wrong, linking, dev, c,






*SIMILAR VIDEOS*
Searching Video's for wrong, linking, dev, c,
advertisement




Something Is Wrong When Linking (dev-c++)