Jump to content

samgj

Community Members
  • Posts

    23
  • Joined

  • Last visited

samgj's Achievements

Discens

Discens (2/14)

0

Reputation

  1. samgj@samgj:~/sdltest$ ld /usr/lib/libGL.so /usr/lib/libGLU.so /usr/lib/libSDL.so sdltest.o -o sdltest ld: warning: cannot find entry symbol _start; defaulting to 00000000080484f8 samgj@samgj:~/sdltest$ ls sdlinittest sdltest sdltest.c.save sdltest.sh sdlinittest.cpp sdltest.c sdltest.o usr samgj@samgj:~/sdltest$ ./sdltest bash: ./sdltest: No such file or directory Why is this happening, I imagine it has something to do with the linker warning but, I can't tell what that means.
  2. Python has an operator called in that returns true if a variable is a member of a list or array. What is the C or C++ equivilent of this?
  3. How about Capture the Flag?
  4. We have a dragon, an airplane, and an elven ship, we could have cheats to spawn those. Oh, and typing "realism" could make the game sepia and, "idspispopd" which turns off collision and allows unit to walk anywhere.
  5. Maybe the mapmaker could select "User Defined" as a color so they could select what color they wanted.
  6. This doesn't work. It says No such file or directory. Edit: After I put #include <SDL/SDL.h> in the header and use accents rather than quotes it works.
  7. Here's the code. #include <stdio.h> #include "usr/include/SDL/SDL.h" SDL_Surface *screen; SDL_Event event; bool done = false; int main(void) { SDL_Init(SDL_INIT_VIDEO); SDL_WM_SetCaption("\"Hello, World!\"", "\"Hello, World!\""); screen = SDL_SetVideoMode(640, 480, 8, SDL_SWSURFACE); while(!done) { SDL_Flip(screen); if(event.type == SDL_QUIT) { done = true; } } SDL_Quit(); return 0; } This next one is from the manual. #include "usr/include/SDL/SDL.h" /* All SDL App's need this */ #include <stdio.h> int main() { printf("Initializing SDL.\n"); /* Initialize defaults, Video and Audio */ if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { printf("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); } printf("SDL initialized.\n"); printf("Quiting SDL.\n"); /* Shutdown all subsystems */ SDL_Quit(); printf("Quiting....\n"); exit(0); } Then the compiler output for the first one is samgj@samgj:~/sdltest$ g++ sdltest.c -o sdltest /tmp/ccaCl8C5.o: In function `main': sdltest.c:(.text+0x11): undefined reference to `SDL_Init' sdltest.c:(.text+0x25): undefined reference to `SDL_WM_SetCaption' sdltest.c:(.text+0x49): undefined reference to `SDL_SetVideoMode' sdltest.c:(.text+0x5d): undefined reference to `SDL_Flip' sdltest.c:(.text+0x82): undefined reference to `SDL_Quit' collect2: ld returned 1 exit status But then this program compiles fine. #include "usr/include/SDL/SDL.h" #include <stdio.h> int main { printf("Hello, World!"); return 0; } I use Debian 6.0.4 which had sdl and sdl-dev instaled automatically. In my subdirectory I have the header files from the SDL website that's what '#include "usr/include/SDL/SDL.h"'
  8. I have SDL installed but, I'm referencing a copy of them in my home directory.
  9. I figure some programers here can help me. I wrote some C++ SDL programs and whenever I try to compile it reports all the SDL functions as being undefined. They are all spelt right and there no other problems with the program but, it still won't compile.
  10. Just don't make it intrusive for people who don't use social media.
  11. Will it be possible to choose your color on maps that will allow it? It could be like the map editor chooser where any color can be choosen. I liked this feature in Warcraft 3, but only about 12 colors could be picked from.
  12. The Carthraginian spear man has the second letter of his name rendered as question mark, I assume this caused by the character not being available in the game's font.
  13. Chinese, from what I know, had little to do with the current civilizations
  14. Real Time Stratagy games are about working with what resources are available, renewable resources would alow players to sit around and would limit action and the need for players to stratagise about how to improve their current situation.
×
×
  • Create New...