C++ OpenGL, errors when linking, compiling -


witam, nie potrafię sobie poradzić z błędami linkera chyba że kompilatora(i raczej jest kompilator). chciałem swoje stare projekty skompilować na nowo poprawić programy, jednak nie potrafię przejść przez proces linkowania. w folderze z source.cpp posiadam dodatkowo hello, cant move on errors linker, or compiler. want compile old projects, cant cope errors. in folder source.cpp have also

open32.dll  glu32.dll   glut32.dll (i download it)  glut.h (si download it)  glut.lib (i download it)  glut.def (i think not nessesery) 

bach looks like

path %pathc:\mingw\bin  g++ -o program.exe main.cpp glut32.lib  

and errors in every line use function glut32.dll/opengl.dll, errors similar c:\users\przemko\appdata\local\temp\cc4n2cuy.o:main.cpp:(.text+0xe5): undefined reference `glclearcolor@16'

in mingw\include have folder gl headers:

glu.h  gl.h  glext.h 

"i while installing mingw"

my source include

#include <time.h> #include <iostream> #include <math.h> #include <windows.h> #include "glut.h" 

i need help, dont remember how link every item, wish have old bash , libary, dont.

you don't link actual opengl library, need add -lgl command:

$ g++ -o program.exe main.cpp glut32.lib -lgl 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -