|
|
|
octopus@pc3:~$ cd /home/octopus/文檔/編程/C++/測試區/opengl octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ test.cpp -o test -lglut /tmp/ccuX7lKx.o: In function `reshape(int, int)': test.cpp:(.text+0x2ec): undefined reference to `gluPerspective' test.cpp:(.text+0x33b): undefined reference to `gluLookAt' /tmp/ccuX7lKx.o: In function `cycle_view()': test.cpp:(.text+0x3dc): undefined reference to `gluLookAt' test.cpp:(.text+0x41f): undefined reference to `gluLookAt' test.cpp:(.text+0x46f): undefined reference to `gluLookAt' collect2: ld 返回 1 octopus@pc3:~/文檔/編程/C++/測試區/opengl$ sudo apt-get install mesa-common-dev mesademos libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev [sudo] password for octopus: 正在讀取軟件包列表... 完成 正在分析軟件包的依賴關係樹 正在讀取狀態信息... 完成 E: 未發現軟件包 mesademos octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ sample.cpp -o sample -lglut octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ example.cpp -o example -lglut /tmp/ccee9W1e.o: In function `init()': example.cpp:(.text+0x138): undefined reference to `gluLookAt' collect2: ld 返回 1 octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ test2.cpp -o test2 -lglut -LGLU /tmp/cckuU9L2.o: In function `main': test2.cpp:(.text+0x21): undefined reference to `gluPerspective' collect2: ld 返回 1 octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ test2.cpp -o test2 -lglut -lGLU octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ example.cpp -o example -lglut -lGLU octopus@pc3:~/文檔/編程/C++/測試區/opengl$ g++ test.cpp -o test -lglut -lGLU octopus@pc3:~/文檔/編程/C++/測試區/opengl$ cd /home/octopus/程序/jenngo octopus@pc3:~/程序/jenngo$ make g++ -I/sw/include -o jenn jenn.o linalg.o todd_coxeter.o go_game.o animation.o drawing.o definitions.o jenn.o: In function `_glut_update_projection()': jenn.C:(.text+0xec): undefined reference to `glMatrixMode' jenn.C:(.text+0xf1): undefined reference to `glLoadIdentity' jenn.C:(.text+0x185): undefined reference to `glOrtho' jenn.C:(.text+0x191): undefined reference to `glMatrixMode' jenn.C:(.text+0x196): undefined reference to `glLoadIdentity' jenn.C:(.text+0x19b): undefined reference to `glutPostRedisplay' jenn.o: In function `unpause()': jenn.C:(.text+0x244): undefined reference to `glutIdleFunc' jenn.o: In function `toggle_pause()': jenn.C:(.text+0x28e): undefined reference to `glutIdleFunc' jenn.o: In function `display()': jenn.C:(.text+0x2cb): undefined reference to `glClear' jenn.C:(.text+0x32b): undefined reference to `glViewport' jenn.C:(.text+0x365): undefined reference to `glViewport' jenn.C:(.text+0x38d): undefined reference to `glRotatef' jenn.C:(.text+0x3c2): undefined reference to `glRotatef' jenn.C:(.text+0x3e6): undefined reference to `glViewport' jenn.C:(.text+0x404): undefined reference to `glutSwapBuffers' jenn.o: In function `mouse(int, int, int, int)': jenn.C:(.text+0x6da): undefined reference to `glutSetWindowTitle' jenn.o: In function `drift()': jenn.C:(.text+0x7e5): undefined reference to `glutPostRedisplay' jenn.o: In function `keyboard(unsigned char, int, int)': jenn.C:(.text+0x862): undefined reference to `glutSetWindowTitle' jenn.o: In function `special_keys(int, int, int)': jenn.C:(.text+0x8c6): undefined reference to `glutSetWindowTitle' jenn.o: In function `control_display()': jenn.C:(.text+0x8da): undefined reference to `glClear' jenn.o: In function `GlutManager::GlutManager(int*, char**)': jenn.C:(.text+0xad2): undefined reference to `glutInit' jenn.C:(.text+0xade): undefined reference to `glutInitDisplayMode' jenn.C:(.text+0xaf2): undefined reference to `glutInitWindowSize' jenn.C:(.text+0xb1f): undefined reference to `glutInitWindowPosition' jenn.C:(.text+0xb2c): undefined reference to `glutCreateWindow' jenn.C:(.text+0xb44): undefined reference to `glutSetWindowTitle' jenn.C:(.text+0xb50): undefined reference to `glutGameModeString' jenn.C:(.text+0xb5f): undefined reference to `glutMainLoop' jenn.o: In function `GlutManager::init_callbacks()': jenn.C:(.text+0xb74): undefined reference to `glutDisplayFunc' jenn.C:(.text+0xb80): undefined reference to `glutReshapeFunc' jenn.C:(.text+0xb8c): undefined reference to `glutMouseFunc' jenn.C:(.text+0xb98): undefined reference to `glutKeyboardFunc' jenn.C:(.text+0xba4): undefined reference to `glutSpecialFunc' jenn.C:(.text+0xbb0): undefined reference to `glutMotionFunc' jenn.C:(.text+0xbbc): undefined reference to `glutIdleFunc' jenn.C:(.text+0xbe4): undefined reference to `glClearColor' jenn.C:(.text+0xbf0): undefined reference to `glShadeModel' jenn.C:(.text+0xbfc): undefined reference to `glEnable' jenn.C:(.text+0xc10): undefined reference to `glHint' jenn.C:(.text+0xc1c): undefined reference to `glEnable' jenn.C:(.text+0xc30): undefined reference to `glBlendFunc' jenn.o: In function `GlutManager::toggle_fullscreen()': jenn.C:(.text+0xc44): undefined reference to `glutGameModeGet' jenn.C:(.text+0xc52): undefined reference to `glutEnterGameMode' jenn.C:(.text+0xc5e): undefined reference to `glutLeaveGameMode' drawing.o: In function `Drawings::Drawing::display_vertex(int)': drawing.C:(.text+0xf34): undefined reference to `glLineWidth' drawing.C:(.text+0xf3f): undefined reference to `glColor4fv' drawing.C:(.text+0xf4b): undefined reference to `glBegin' drawing.C:(.text+0xf5d): undefined reference to `glVertex2f' drawing.C:(.text+0xf6f): undefined reference to `glVertex2f' drawing.C:(.text+0xf74): undefined reference to `glEnd' drawing.C:(.text+0xf87): undefined reference to `glLineWidth' drawing.C:(.text+0xf92): undefined reference to `glColor4fv' drawing.C:(.text+0xf9e): undefined reference to `glBegin' drawing.C:(.text+0xfb0): undefined reference to `glVertex2f' drawing.C:(.text+0xfc2): undefined reference to `glVertex2f' drawing.C:(.text+0xfc7): undefined reference to `glEnd' drawing.C:(.text+0xfd2): undefined reference to `glLineWidth' drawing.C:(.text+0xfdd): undefined reference to `glColor4fv' drawing.C:(.text+0xfe9): undefined reference to `glBegin' drawing.C:(.text+0xffb): undefined reference to `glVertex2f' drawing.C:(.text+0x100d): undefined reference to `glVertex2f' drawing.C:(.text+0x1012): undefined reference to `glEnd' drawing.C:(.text+0x1100): undefined reference to `glLineWidth' drawing.C:(.text+0x110b): undefined reference to `glColor4fv' drawing.C:(.text+0x111f): undefined reference to `glPolygonMode' drawing.C:(.text+0x112b): undefined reference to `glBegin' drawing.C:(.text+0x1159): undefined reference to `glVertex2f' drawing.C:(.text+0x116d): undefined reference to `glEnd' drawing.C:(.text+0x117a): undefined reference to `glLineWidth' drawing.C:(.text+0x1185): undefined reference to `glColor4fv' drawing.C:(.text+0x1199): undefined reference to `glPolygonMode' drawing.C:(.text+0x11a5): undefined reference to `glBegin' drawing.C:(.text+0x11d3): undefined reference to `glVertex2f' drawing.C:(.text+0x11e7): undefined reference to `glEnd' drawing.C:(.text+0x11f4): undefined reference to `glLineWidth' drawing.C:(.text+0x11ff): undefined reference to `glColor4fv' drawing.C:(.text+0x1213): undefined reference to `glPolygonMode' drawing.C:(.text+0x121f): undefined reference to `glBegin' drawing.C:(.text+0x124d): undefined reference to `glVertex2f' drawing.C:(.text+0x1261): undefined reference to `glEnd' drawing.C:(.text+0x1655): undefined reference to `glLineWidth' drawing.C:(.text+0x1660): undefined reference to `glColor4fv' drawing.C:(.text+0x166c): undefined reference to `glBegin' drawing.C:(.text+0x167e): undefined reference to `glVertex2f' drawing.C:(.text+0x1690): undefined reference to `glVertex2f' drawing.C:(.text+0x1695): undefined reference to `glEnd' drawing.C:(.text+0x16a8): undefined reference to `glLineWidth' drawing.C:(.text+0x16b3): undefined reference to `glColor4fv' drawing.C:(.text+0x16bf): undefined reference to `glBegin' drawing.C:(.text+0x16d1): undefined reference to `glVertex2f' drawing.C:(.text+0x16e3): undefined reference to `glVertex2f' drawing.C:(.text+0x16e8): undefined reference to `glEnd' drawing.C:(.text+0x16f3): undefined reference to `glLineWidth' drawing.C:(.text+0x16fe): undefined reference to `glColor4fv' drawing.C:(.text+0x170a): undefined reference to `glBegin' drawing.C:(.text+0x171c): undefined reference to `glVertex2f' drawing.C:(.text+0x172e): undefined reference to `glVertex2f' drawing.C:(.text+0x1733): undefined reference to `glEnd' collect2: ld 返回 1 make: *** [jenn] 錯誤 1 octopus@pc3:~/程序/jenngo$ make g++ -I/sw/include -o jenn jenn.o linalg.o todd_coxeter.o go_game.o animation.o drawing.o definitions.o -lglut -lGLU -lGL octopus@pc3:~/程序/jenngo$
|
|
|
|
接下來我要編譯:Johann
|
|
octopus@pc3:~$ cd 程序/johann/ octopus@pc3:~/程序/johann$ make g++ -Wall -ggdb -DDEBUG_LEVEL=2 -c -o main.o main.C g++ -Wall -ggdb -o jmapper main.o -lglut -lGLU -lGL -lpng ./jmapper Johann mapper. Copyright (C) 2007 Fritz Obermeyer. License: GLPv3 Usage: jmapper [map file name] Controls: +/- resize points SPACE clear state s clear state and show simplest labels c toggle circle drawing a toggle parsing of ALL points p toggle printing style loading map file default.map
failed to open default.map main.C : 238 void Map::load(const char*) octopus@pc3:~/程序/johann$ ./jmapper Johann mapper. Copyright (C) 2007 Fritz Obermeyer. License: GLPv3 Usage: jmapper [map file name] Controls: +/- resize points SPACE clear state s clear state and show simplest labels c toggle circle drawing a toggle parsing of ALL points p toggle printing style loading map file default.map
failed to open default.map main.C : 238 void Map::load(const char*) octopus@pc3:~/程序/johann$
johann不需要修改原始碼,可以直接在ubuntu下編譯
|
|
jenn系列的三個源碼包中,最難編譯的就是jenngo
|
|
回復:6樓 jmapper是最容易編譯的
|
|
8樓 張樹人
2015-6-14 23:49
其實編譯好的一般不能移植,因為是根據每個計算機的硬件進行編譯的。或者是已經做成portable包的。
|
|
|
|
10樓 巨大八爪鱼
2015-6-16 20:32
編譯jenngo時,我修改了源代碼的很多地方。
|