bom eu dei o apt-get install libsdl1.2-dev e instalou tudo certinho.... mas quando eu vou compilar o jogo com o comando:
gcc -o cube main.cpp -lSDL
ele exibe milhares de erros:
main.cpp: In function ‘void quit()’:
main.cpp:8: error: ‘writeservercfg’ was not declared in this scope
main.cpp:9: error: ‘disconnect’ was not declared in this scope
main.cpp:10: error: ‘cl’ was not declared in this scope
main.cpp:10: error: ‘strcmp’ was not declared in this scope
main.cpp:13: error: ‘SDL_ShowCursor’ was not declared in this scope
main.cpp:20: error: ‘SDL_Quit’ was not declared in this scope
main.cpp:21: error: ‘exit’ was not declared in this scope
main.cpp: In function ‘void fatal(char*, char*)’:
main.cpp:26: error: ‘msg’ was not declared in this scope
main.cpp:26: error: ‘s_sprintfd’ was not declared in this scope
main.cpp:27: error: ‘printf’ was not declared in this scope
main.cpp:31: error: ‘exit’ was not declared in this scope
main.cpp: At global scope:
main.cpp:34: error: expected constructor, destructor, or type conversion before ‘*’ token
main.cpp:39: error: expected constructor, destructor, or type conversion before ‘*’ token
main.cpp: In function ‘void screenshot()’:
main.cpp:45: error: ‘SDL_Surface’ was not declared in this scope
main.cpp:45: error: ‘image’ was not declared in this scope
main.cpp:46: error: ‘temp’ was not declared in this scope
main.cpp:48: error: ‘SDL_SWSURFACE’ was not declared in this scope
main.cpp:48: error: ‘SDL_CreateRGBSurface’ was not declared in this scope
main.cpp:52: error: ‘GL_RGB’ was not declared in this scope
main.cpp:52: error: ‘GL_UNSIGNED_BYTE’ was not declared in this scope
main.cpp:52: error: ‘glReadPixels’ was not declared in this scope
main.cpp:56: error: ‘memcpy’ was not declared in this scope
main.cpp:57: error: ‘endianswap’ was not declared in this scope
main.cpp:59: error: ‘buf’ was not declared in this scope
main.cpp:59: error: ‘s_sprintfd’ was not declared in this scope
main.cpp:60: error: ‘SDL_SaveBMP’ was not declared in this scope
main.cpp:61: error: ‘SDL_FreeSurface’ was not declared in this scope
main.cpp:63: error: ‘SDL_FreeSurface’ was not declared in this scope
main.cpp: At global scope:
main.cpp:67: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp:68: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp: In function ‘void computescreen(const char*)’:
main.cpp:73: error: ‘gettextres’ was not declared in this scope
main.cpp:74: error: ‘loopi’ was not declared in this scope
main.cpp:75: error: expected `;' before ‘{’ token
main.cpp: In function ‘void bar(float, int, int, float, float, float)’:
main.cpp:106: error: ‘glColor3f’ was not declared in this scope
main.cpp:107: error: ‘glVertex2f’ was not declared in this scope
main.cpp: In function ‘void show_out_of_renderloop_progress(float, const char*, float, const char*)’:
main.cpp:120: error: ‘gettextres’ was not declared in this scope
main.cpp:122: error: ‘GL_DEPTH_TEST’ was not declared in this scope
main.cpp:122: error: ‘glDisable’ was not declared in this scope
main.cpp:123: error: ‘GL_PROJECTION’ was not declared in this scope
main.cpp:123: error: ‘glMatrixMode’ was not declared in this scope
main.cpp:124: error: ‘glPushMatrix’ was not declared in this scope
main.cpp:125: error: ‘glLoadIdentity’ was not declared in this scope
main.cpp:126: error: ‘glOrtho’ was not declared in this scope
main.cpp:129: error: ‘GL_QUADS’ was not declared in this scope
main.cpp:129: error: ‘glBegin’ was not declared in this scope
main.cpp:143: error: ‘glEnd’ was not declared in this scope
main.cpp:145: error: ‘GL_BLEND’ was not declared in this scope
main.cpp:145: error: ‘glEnable’ was not declared in this scope
main.cpp:146: error: ‘GL_TEXTURE_2D’ was not declared in this scope
main.cpp:149: error: ‘draw_text’ was not declared in this scope
main.cpp:150: error: ‘draw_text’ was not declared in this scope
main.cpp:155: error: ‘glPopMatrix’ was not declared in this scope
main.cpp:157: error: ‘SDL_GL_SwapBuffers’ was not declared in this scope
main.cpp: In function ‘void fullscreen()’:
main.cpp:165: error: ‘screen’ was not declared in this scope
main.cpp:165: error: ‘SDL_WM_ToggleFullScreen’ was not declared in this scope
main.cpp:166: error: ‘SDL_FULLSCREEN’ was not declared in this scope
main.cpp:166: error: ‘SDL_GRAB_ON’ was not declared in this scope
main.cpp:166: error: ‘SDL_GRAB_OFF’ was not declared in this scope
main.cpp:166: error: ‘SDL_WM_GrabInput’ was not declared in this scope
main.cpp: In function ‘void screenres(int*, int*, int*)’:
main.cpp:175: error: ‘SDL_Surface’ was not declared in this scope
main.cpp:175: error: ‘surf’ was not declared in this scope
main.cpp:175: error: ‘SDL_OPENGL’ was not declared in this scope
main.cpp:175: error: ‘SDL_RESIZABLE’ was not declared in this scope
main.cpp:175: error: ‘screen’ was not declared in this scope
main.cpp:175: error: ‘SDL_FULLSCREEN’ was not declared in this scope
main.cpp:175: error: ‘SDL_SetVideoMode’ was not declared in this scope
main.cpp:180: error: ‘glViewport’ was not declared in this scope
main.cpp: At global scope:
main.cpp:184: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp:185: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp: In function ‘void keyrepeat(bool)’:
main.cpp:189: error: ‘SDL_DEFAULT_REPEAT_DELAY’ was not declared in this scope
main.cpp:190: error: ‘SDL_DEFAULT_REPEAT_INTERVAL’ was not declared in this scop e
main.cpp:190: error: ‘SDL_EnableKeyRepeat’ was not declared in this scope
main.cpp: At global scope:
main.cpp:193: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp:202: error: expected constructor, destructor, or type conversion before ‘<’ token
main.cpp:203: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp:203: error: expected unqualified-id before ‘)’ token
main.cpp:204: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp: In function ‘void estartmap(const char*)’:
main.cpp:209: error: ‘gamespeed’ was not declared in this scope
main.cpp:210: error: ‘paused’ was not declared in this scope
main.cpp:211: error: ‘sleepcmds’ was not declared in this scope
main.cpp:211: error: ‘loopv’ was not declared in this scope
main.cpp:211: error: expected `;' before ‘delete’
main.cpp:214: error: ‘pruneundos’ was not declared in this scope
main.cpp:215: error: ‘setvar’ was not declared in this scope
main.cpp:216: error: ‘cl’ was not declared in this scope
main.cpp: At global scope:
main.cpp:219: error: expected constructor, destructor, or type conversion before ‘(’ token
main.cpp: In function ‘void limitfps(int&, int)’:
main.cpp:224: error: ‘maxfps’ was not declared in this scope
main.cpp:236: error: ‘SDL_Delay’ was not declared in this scope
main.cpp: In function ‘int main(int, char**)’:
main.cpp:283: error: ‘SDL_FULLSCREEN’ was not declared in this scope
main.cpp:284: error: ‘NULL’ was not declared in this scope
main.cpp:287: error: ‘puts’ was not declared in this scope
main.cpp:294: error: ‘atoi’ was not declared in this scope
main.cpp:304: error: ‘max’ was not declared in this scope
main.cpp:304: error: ‘min’ was not declared in this scope
main.cpp:310: error: ‘path’ was not declared in this scope
main.cpp:310: error: ‘strstr’ was not declared in this scope
main.cpp:315: error: ‘conoutf’ was not declared in this scope
main.cpp:317: error: ‘conoutf’ was not declared in this scope
main.cpp:330: error: ‘SDL_INIT_TIMER’ was not declared in this scope
main.cpp:330: error: ‘SDL_INIT_VIDEO’ was not declared in this scope
main.cpp:330: error: ‘SDL_INIT_AUDIO’ was not declared in this scope
main.cpp:330: error: ‘SDL_Init’ was not declared in this scope
main.cpp:330: error: ‘SDL_GetError’ was not declared in this scope
main.cpp:333: error: ‘enet_initialize’ was not declared in this scope
main.cpp:24: error: too few arguments to function ‘void fatal(char*, char*)’
main.cpp:333: error: at this point in file
main.cpp:338: error: ‘SDL_GL_DOUBLEBUFFER’ was not declared in this scope
main.cpp:338: error: ‘SDL_GL_SetAttribute’ was not declared in this scope
main.cpp:339: error: ‘SDL_GL_DEPTH_SIZE’ was not declared in this scope
main.cpp:342: error: ‘SDL_GL_MULTISAMPLEBUFFERS’ was not declared in this scope
main.cpp:343: error: ‘SDL_GL_MULTISAMPLESAMPLES’ was not declared in this scope
main.cpp:345: error: ‘screen’ was not declared in this scope
main.cpp:345: error: ‘SDL_OPENGL’ was not declared in this scope
main.cpp:345: error: ‘SDL_RESIZABLE’ was not declared in this scope
main.cpp:345: error: ‘SDL_SetVideoMode’ was not declared in this scope
main.cpp:346: error: ‘SDL_GetError’ was not declared in this scope
main.cpp:349: error: ‘SDL_WM_SetCaption’ was not declared in this scope
main.cpp:353: error: ‘SDL_GRAB_ON’ was not declared in this scope
main.cpp:353: error: ‘SDL_WM_GrabInput’ was not declared in this scope
main.cpp:355: error: ‘SDL_ShowCursor’ was not declared in this scope
main.cpp:359: error: ‘execfile’ was not declared in this scope
main.cpp:24: error: too few arguments to function ‘void fatal(char*, char*)’
main.cpp:359: error: at this point in file
main.cpp:24: error: too few arguments to function ‘void fatal(char*, char*)’
main.cpp:364: error: at this point in file
main.cpp:370: error: ‘camera1’ was not declared in this scope
main.cpp:370: error: ‘player’ was not declared in this scope
main.cpp:370: error: ‘cl’ was not declared in this scope
main.cpp:371: error: ‘empty_world’ was not declared in this scope
main.cpp:374: error: ‘initsound’ was not declared in this scope
main.cpp:377: error: ‘newmenu’ was not declared in this scope
main.cpp:379: error: ‘exec’ was not declared in this scope
main.cpp:384: error: ‘execfile’ was not declared in this scope
main.cpp:394: error: ‘string’ was not declared in this scope
main.cpp:394: error: expected `;' before ‘gamecfgname’
main.cpp:395: error: ‘gamecfgname’ was not declared in this scope
main.cpp:395: error: ‘s_strcpy’ was not declared in this scope
main.cpp:396: error: ‘s_strcat’ was not declared in this scope
main.cpp:404: error: ‘cc’ was not declared in this scope
main.cpp:414: error: ‘SDL_GetTicks’ was not declared in this scope
main.cpp:417: error: ‘gamespeed’ was not declared in this scope
main.cpp:420: error: ‘paused’ was not declared in this scope
main.cpp:421: error: ‘worldpos’ was not declared in this scope
main.cpp:422: error: ‘sleepcmds’ was not declared in this scope
main.cpp:422: error: ‘loopv’ was not declared in this scope
main.cpp:423: error: expected `;' before ‘{’ token
main.cpp:437: error: ‘time’ was not declared in this scope
main.cpp:446: error: ‘SDL_GL_SwapBuffers’ was not declared in this scope
main.cpp:451: error: ‘SDL_Event’ was not declared in this scope
main.cpp:451: error: expected `;' before ‘event’
main.cpp:453: error: ‘event’ was not declared in this scope
main.cpp:453: error: ‘SDL_PollEvent’ was not declared in this scope
main.cpp:457: error: ‘SDL_QUIT’ was not declared in this scope
main.cpp:462: error: ‘SDL_VIDEORESIZE’ was not declared in this scope
main.cpp:467: error: ‘SDL_KEYDOWN’ was not declared in this scope
main.cpp:468: error: ‘SDL_KEYUP’ was not declared in this scope
main.cpp:469: error: ‘SDL_PRESSED’ was not declared in this scope
main.cpp:469: error: ‘keypress’ was not declared in this scope
main.cpp:472: error: ‘SDL_ACTIVEEVENT’ was not declared in this scope
main.cpp:473: error: ‘SDL_APPINPUTFOCUS’ was not declared in this scope
main.cpp:480: error: ‘SDL_MOUSEMOTION’ was not declared in this scope
main.cpp:485: error: ‘SDL_WarpMouse’ was not declared in this scope
main.cpp:493: error: ‘SDL_MOUSEBUTTONDOWN’ was not declared in this scope
main.cpp:494: error: ‘SDL_MOUSEBUTTONUP’ was not declared in this scope
e isso por que ainda nao couberam todos os erros no terminal e todos que couberam no terminal nao foram permitidos pelo forum devido ao tamanho da mensagem...
o que estou fazendo de errado??? será que é o comando???
alguem sabe o que pode ser???
Valeu.
Falou.