Thread: sdl_opengl mystery crash

  1. #1
    GA ichijoji's Avatar
    Join Date
    Nov 2002
    Posts
    179

    sdl_opengl mystery crash

    I'm not sure if this should be on the linux board, but it's a mostly an opengl problem so I'll put it here. I'm trying to run a little demo problem from nehe on redhat using opengl through sdl. I copied his code except for the comments into my own file and it compiled fine, but when I run it nothing happens. I put in a cout as the first line in main(), but even that doesn't show up. The original file compiled with gcc, and I'm using g++ (g++ -Wall -ansi test.cpp -o test -lGL -lGLU 'sdl-config --cflags --libs'). All I changed in the compile command is gcc to g++. I need to be able to compile this with g++ for oop, any ideas?
    Illusion and reality become impartiality and confidence.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    try downloading the "linux port" of the tutorial instead of copying and pasting from the html.

  3. #3
    ---
    Join Date
    May 2004
    Posts
    1,379
    i dont think cout will work in SDL
    try
    Code:
    fprintf(stdout,"OUTPUT");

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Hooking Crash?
    By Elysia in forum Windows Programming
    Replies: 9
    Last Post: 03-15-2008, 01:13 PM
  2. Can not debug a crash
    By hannibar in forum Windows Programming
    Replies: 2
    Last Post: 06-30-2007, 10:02 AM
  3. Dynamic array sizing causes crash
    By Mithoric in forum C++ Programming
    Replies: 3
    Last Post: 12-30-2003, 07:46 AM
  4. FYI: asctime(gmtime(&mytime)) = crash!
    By anonytmouse in forum C Programming
    Replies: 2
    Last Post: 09-29-2003, 02:24 AM
  5. Mystery.
    By Nutshell in forum C Programming
    Replies: 1
    Last Post: 01-27-2002, 01:41 AM