Portál AbcLinuxu, 18. dubna 2024 20:01


Dotaz: GLUT - problem

4.3.2005 11:37 Pavel Kucik
GLUT - problem
Přečteno: 434×
Odpovědět | Admin
ahoj,

mam problem, kdyz si chcu prelozit jeden projekt do skoly, tak me to vypise toho:

g++ -c main.cpp -o main.o -Wall -DGLUT_NO_LIB_PRAGMA -DGLUT_NO_WARNING_DISABLE main.cpp:41:21: GL/glut.h: No such file or directory main.cpp: In function `void onDisplay()': main.cpp:209: error: `glutSwapBuffers' undeclared (first use this function) main.cpp:209: error: (Each undeclared identifier is reported only once for each function it appears in.) main.cpp: In function `void onKeyboard(unsigned char, int, int)': main.cpp:238: error: `GLUT_WINDOW_X' undeclared (first use this function) main.cpp:238: error: `glutGet' undeclared (first use this function) main.cpp:239: error: `GLUT_WINDOW_Y' undeclared (first use this function) main.cpp:240: error: `glutFullScreen' undeclared (first use this function) main.cpp:247: error: `glutPositionWindow' undeclared (first use this function) main.cpp:248: error: `glutReshapeWindow' undeclared (first use this function) main.cpp:289: error: `glutPostRedisplay' undeclared (first use this function) main.cpp: In function `void onMouseClick(int, int, int, int)': main.cpp:311: error: `GLUT_LEFT_BUTTON' undeclared (first use this function) main.cpp:313: error: `GLUT_DOWN' undeclared (first use this function) main.cpp:329: error: `GLUT_MIDDLE_BUTTON' undeclared (first use this function) main.cpp:348: error: `GLUT_RIGHT_BUTTON' undeclared (first use this function) main.cpp: In function `int main(int, char**)': main.cpp:394: error: `glutInit' undeclared (first use this function) main.cpp:400: error: `GLUT_RGBA' undeclared (first use this function) main.cpp:400: error: `GLUT_DOUBLE' undeclared (first use this function) main.cpp:400: error: `glutInitDisplayMode' undeclared (first use this function) main.cpp:402: error: `glutInitWindowSize' undeclared (first use this function) main.cpp:404: error: `glutCreateWindow' undeclared (first use this function) main.cpp:407: error: `glutDisplayFunc' undeclared (first use this function) main.cpp:409: error: `glutReshapeFunc' undeclared (first use this function) main.cpp:411: error: `glutKeyboardFunc' undeclared (first use this function) main.cpp:413: error: `glutMouseFunc' undeclared (first use this function) main.cpp:415: error: `glutMotionFunc' undeclared (first use this function) main.cpp:418: error: `glutMainLoop' undeclared (first use this function) make: *** [main.o] Error

ja sem myslel, ze knihovny pro glut jsou uz v linuxu obsazeny standartne, mam mdk10.
Nástroje: Začni sledovat (0) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Pavel Stárek avatar 4.3.2005 11:43 Pavel Stárek | skóre: 44 | blog: Tady bloguju já :-) | Kolín
Rozbalit Rozbalit vše Re: GLUT - problem
Odpovědět | | Sbalit | Link | Blokovat | Admin
No standardně možná ano, ale máš nainstalovaný balíček glut-devel ? A existuje v /usr/include/GL/glut.h ? Pokud ne, tak nemáš nainstalován glut-devel, nebo freeglut-devel balíčky.
Kdo chce, hledá způsob; kdo nechce, hledá důvod.
4.3.2005 12:00 Pavel Kucik
Rozbalit Rozbalit vše Re: GLUT - problem
Odpovědět | | Sbalit | Link | Blokovat | Admin
tak sem si nainstaloval glut-devel, ale haze me to zase jiny chyby pro zmenu:

g++ main.o student.o -o main.exe -lGL -lGLU -lglut -lXmu -lX11 -lXi -L/usr/X11R6/lib /usr/bin/ld: cannot find -lglut collect2: ld returned 1 exit status make: *** [main.exe] Error 1
4.3.2005 12:50 Petr Šobáň | skóre: 80 | blog: soban | Olomouc
Rozbalit Rozbalit vše Re: GLUT - problem
No a máš tam tu knihovnu glut ?

"cannot find -lglut"

Případně správnou cestu k ní aby to linker našel ?
4.3.2005 12:54 honza
Rozbalit Rozbalit vše Re: GLUT - problem
Odpovědět | | Sbalit | Link | Blokovat | Admin
Zkus mrknout sem: glut 3.dil (root.cz)

Kdyz vemes ten jednoduchej example, ulozis a pouzijes prikaz ke kompilaci kterej je tam napsanej, melo by to jit.. aspon me to slo (MDK10)

Do jaky to mas skoly? :)
29.4.2005 21:18 ssil | skóre: 15
Rozbalit Rozbalit vše Re: GLUT - problem
Můj problém se také týká GLUT. Při kompilaci se dovídám, že /usr/bin/ld: nemůže najít -lXmu a tak ld vrací 1 exit status. Kompiluju právě první příklad z root.cz a dělám to na Sarge.
30.4.2005 00:10 Drašar | skóre: 27 | Velký Týnec
Rozbalit Rozbalit vše Re: GLUT - problem
Tak zkus nainstalovat balik libxmu-dev, popr. libxmuu-dev ;-).
Patička
6.2.2006 15:13 libcha
Rozbalit Rozbalit vše glut-devel
Odpovědět | | Sbalit | Link | Blokovat | Admin
A muzu mit blbej dotaz kde se da stahnout glut-devel pro dev-cpp 4.9.9.1 (win32) ? Diky
18.5.2009 15:45 Grims
Rozbalit Rozbalit vše Re: glut-devel
Ve Windows glut-devel neni tam se musí stahnout knihovny(např z Nehe) a nahrát do system 32 a system

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.