Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1] 2   Go Down

Author Topic: [SDL] Tutorial help  (Read 8572 times)

0 Members and 1 Guest are viewing this topic.
[SDL] Tutorial help
« on: May 26, 2011, 05:28:51 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
i am doing lazy foos tutorial , and i cant figure out why the text wont draw and it crashes at startup.

Code: [Select]
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *screen = NULL;
SDL_Surface *message = NULL;

//The event structure
SDL_Event event;

//The font that's going to be used
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 255, 255, 255 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "TTF Test", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 28 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
SDL_FreeSurface( downMessage);
SDL_FreeSurface( leftMessage);
SDL_FreeSurface( rightMessage);
    //Close the font that was used
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Render the text
    upMessage = TTF_RenderText_Solid( font, "up was pressed", textColor );
downMessage = TTF_RenderText_Solid( font,"down was pressed",textColor);
leftMessage = TTF_RenderText_Solid(font, "left was pressed",textColor);
rightMessage = TTF_RenderText_Solid(font, "right was pressed",textColor);
apply_surface(0,0,background,screen);
    //If there was an error in rendering the text
    if( message == NULL )
    {
        return 1;
    }


    //Apply the images to the screen
   
   
    //While the user hasn't quit
    while( quit == false )
    {
        //While there's events to handle
        while( SDL_PollEvent( &event ) )
        {
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_UP : message = upMessage; break;
case SDLK_DOWN : message = downMessage; break;
case SDLK_LEFT : message = leftMessage; break;
case SDLK_RIGHT : message = rightMessage; break;
}

}
            //If the user has Xed out the window
else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }
    }


if (message != NULL)
{
apply_surface( 0, 0, background, screen );
apply_surface((SCREEN_WIDTH - message->w) / 2, (SCREEN_HEIGHT - message->h) / 2, message,screen);

message = NULL;

}

//Update the screen
    if( SDL_Flip( screen ) == -1 )
    {
        return 2;
    }


    //Free surfaces and font then quit SDL_ttf and SDL
    clean_up();

    return 0;
}
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *screen = NULL;
SDL_Surface *message = NULL;

//The event structure
SDL_Event event;

//The font that's going to be used
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 255, 255, 255 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "TTF Test", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 28 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
SDL_FreeSurface( downMessage);
SDL_FreeSurface( leftMessage);
SDL_FreeSurface( rightMessage);
    //Close the font that was used
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Render the text
    upMessage = TTF_RenderText_Solid( font, "up was pressed", textColor );
downMessage = TTF_RenderText_Solid( font,"down was pressed",textColor);
leftMessage = TTF_RenderText_Solid(font, "left was pressed",textColor);
rightMessage = TTF_RenderText_Solid(font, "right was pressed",textColor);
apply_surface(0,0,background,screen);
    //If there was an error in rendering the text
    if( message == NULL )
    {
        return 1;
    }


    //Apply the images to the screen
   
   
    //While the user hasn't quit
    while( quit == false )
    {
        //While there's events to handle
        while( SDL_PollEvent( &event ) )
        {
if (event.type == SDL_KEYDOWN)
{
switch(event.key.keysym.sym)
{
case SDLK_UP : message = upMessage; break;
case SDLK_DOWN : message = downMessage; break;
case SDLK_LEFT : message = leftMessage; break;
case SDLK_RIGHT : message = rightMessage; break;
}

}
            //If the user has Xed out the window
else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }
    }


if (message != NULL)
{
apply_surface( 0, 0, background, screen );
apply_surface((SCREEN_WIDTH - message->w) / 2, (SCREEN_HEIGHT - message->h) / 2, message,screen);

message = NULL;

}

//Update the screen
    if( SDL_Flip( screen ) == -1 )
    {
        return 2;
    }


    //Free surfaces and font then quit SDL_ttf and SDL
    clean_up();

    return 0;
}


Quote
The thread 'Win32 Thread' (0x958) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1464) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1674) has exited with code 1 (0x1).
The program '[5680] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x958) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1464) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1674) has exited with code 1 (0x1).
The program '[5680] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Xiphirx

wat
Re: [SDL] Tutorial help
« Reply #1 on: May 26, 2011, 06:16:14 am »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
is the SDL_ttf.dll file next to the exe?
Logged
  • For The Swarm
Re: [SDL] Tutorial help
« Reply #2 on: May 26, 2011, 07:19:10 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
yes
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Re: [SDL] Tutorial help
« Reply #3 on: May 26, 2011, 09:23:32 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
Tried running through it with a debugger?
Logged
Re: [SDL] Tutorial help
« Reply #4 on: May 26, 2011, 04:06:32 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
i tried running it with visual C++ 2010 with debug it crashes at start up. I just went over the code , with the lesson copy and its like 1:1 except he ad font bigger and color of font was different.


Code: [Select]
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *message = NULL;
SDL_Surface *screen = NULL;

//The event structure
SDL_Event event;

//The font
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 0, 0, 0 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "Press an Arrow Key", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 72 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
    SDL_FreeSurface( downMessage );
    SDL_FreeSurface( leftMessage );
    SDL_FreeSurface( rightMessage );

    //Close the font
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Generate the message surfaces
    upMessage = TTF_RenderText_Solid( font, "Up was pressed.", textColor );
    downMessage = TTF_RenderText_Solid( font, "Down was pressed.", textColor );
    leftMessage = TTF_RenderText_Solid( font, "Left was pressed", textColor );
    rightMessage = TTF_RenderText_Solid( font, "Right was pressed", textColor );

    //Apply the background
    apply_surface( 0, 0, background, screen );

    //While the user hasn't quit
    while( quit == false )
    {
        //If there's an event to handle
        if( SDL_PollEvent( &event ) )
        {
            //If a key was pressed
            if( event.type == SDL_KEYDOWN )
            {
                //Set the proper message surface
                switch( event.key.keysym.sym )
                {
                    case SDLK_UP: message = upMessage; break;
                    case SDLK_DOWN: message = downMessage; break;
                    case SDLK_LEFT: message = leftMessage; break;
                    case SDLK_RIGHT: message = rightMessage; break;
                }
            }

            //If the user has Xed out the window
            else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }

        //If a message needs to be displayed
        if( message != NULL )
        {
            //Apply the background to the screen
            apply_surface( 0, 0, background, screen );

            //Apply the message centered on the screen
            apply_surface( ( SCREEN_WIDTH - message->w ) / 2, ( SCREEN_HEIGHT - message->h ) / 2, message, screen );

            //Null the surface pointer
            message = NULL;
        }

        //Update the screen
        if( SDL_Flip( screen ) == -1 )
        {
            return 1;
        }
    }

    //Clean up
    clean_up();

    return 0;
}
this is lesson source code it works i cant figure out what i did wrong?
« Last Edit: May 26, 2011, 08:11:08 pm by REV2K7 »
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Xiphirx

wat
Re: [SDL] Tutorial help
« Reply #5 on: May 26, 2011, 08:24:05 pm »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
Can we get the error message that pops up?
Logged
  • For The Swarm

Starforsaken101

Wake the Beast
Re: [SDL] Tutorial help
« Reply #6 on: May 26, 2011, 08:42:55 pm »
  • www.mouffers.com
  • *
  • Reputation: +69/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2577
i tried running it with visual C++ 2010 with debug it crashes at start up. I just went over the code , with the lesson copy and its like 1:1 except he ad font bigger and color of font was different.


Code: [Select]
/*This source code copyrighted by Lazy Foo' Productions (2004-2011)
and may not be redestributed without written permission.*/

//The headers
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include <string>

//Screen attributes
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

//The surfaces
SDL_Surface *background = NULL;
SDL_Surface *upMessage = NULL;
SDL_Surface *downMessage = NULL;
SDL_Surface *leftMessage = NULL;
SDL_Surface *rightMessage = NULL;
SDL_Surface *message = NULL;
SDL_Surface *screen = NULL;

//The event structure
SDL_Event event;

//The font
TTF_Font *font = NULL;

//The color of the font
SDL_Color textColor = { 0, 0, 0 };

SDL_Surface *load_image( std::string filename )
{
    //The image that's loaded
    SDL_Surface* loadedImage = NULL;

    //The optimized surface that will be used
    SDL_Surface* optimizedImage = NULL;

    //Load the image
    loadedImage = IMG_Load( filename.c_str() );

    //If the image loaded
    if( loadedImage != NULL )
    {
        //Create an optimized surface
        optimizedImage = SDL_DisplayFormat( loadedImage );

        //Free the old surface
        SDL_FreeSurface( loadedImage );

        //If the surface was optimized
        if( optimizedImage != NULL )
        {
            //Color key surface
            SDL_SetColorKey( optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB( optimizedImage->format, 0, 0xFF, 0xFF ) );
        }
    }

    //Return the optimized surface
    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL )
{
    //Holds offsets
    SDL_Rect offset;

    //Get offsets
    offset.x = x;
    offset.y = y;

    //Blit
    SDL_BlitSurface( source, clip, destination, &offset );
}

bool init()
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( screen == NULL )
    {
        return false;
    }

    //Initialize SDL_ttf
    if( TTF_Init() == -1 )
    {
        return false;
    }

    //Set the window caption
    SDL_WM_SetCaption( "Press an Arrow Key", NULL );

    //If everything initialized fine
    return true;
}

bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 72 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );
    SDL_FreeSurface( upMessage );
    SDL_FreeSurface( downMessage );
    SDL_FreeSurface( leftMessage );
    SDL_FreeSurface( rightMessage );

    //Close the font
    TTF_CloseFont( font );

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}

int main( int argc, char* args[] )
{
    //Quit flag
    bool quit = false;

    //Initialize
    if( init() == false )
    {
        return 1;
    }

    //Load the files
    if( load_files() == false )
    {
        return 1;
    }

    //Generate the message surfaces
    upMessage = TTF_RenderText_Solid( font, "Up was pressed.", textColor );
    downMessage = TTF_RenderText_Solid( font, "Down was pressed.", textColor );
    leftMessage = TTF_RenderText_Solid( font, "Left was pressed", textColor );
    rightMessage = TTF_RenderText_Solid( font, "Right was pressed", textColor );

    //Apply the background
    apply_surface( 0, 0, background, screen );

    //While the user hasn't quit
    while( quit == false )
    {
        //If there's an event to handle
        if( SDL_PollEvent( &event ) )
        {
            //If a key was pressed
            if( event.type == SDL_KEYDOWN )
            {
                //Set the proper message surface
                switch( event.key.keysym.sym )
                {
                    case SDLK_UP: message = upMessage; break;
                    case SDLK_DOWN: message = downMessage; break;
                    case SDLK_LEFT: message = leftMessage; break;
                    case SDLK_RIGHT: message = rightMessage; break;
                }
            }

            //If the user has Xed out the window
            else if( event.type == SDL_QUIT )
            {
                //Quit the program
                quit = true;
            }
        }

        //If a message needs to be displayed
        if( message != NULL )
        {
            //Apply the background to the screen
            apply_surface( 0, 0, background, screen );

            //Apply the message centered on the screen
            apply_surface( ( SCREEN_WIDTH - message->w ) / 2, ( SCREEN_HEIGHT - message->h ) / 2, message, screen );

            //Null the surface pointer
            message = NULL;
        }

        //Update the screen
        if( SDL_Flip( screen ) == -1 )
        {
            return 1;
        }
    }

    //Clean up
    clean_up();

    return 0;
}
this is lesson source code it works i cant figure out what i did wrong?

Just so we're clear, did you run it in debug or with a debugger? They're two completely different things.
Logged
  • Starforsaken101's DeviantART
Re: [SDL] Tutorial help
« Reply #7 on: May 26, 2011, 09:01:51 pm »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
I am probably being dumb but I would change the return codes of the things which return 1 to all be unique; e.g. 1, 2, 3, 4, etc. You could figure out which is causing you issue faster than figuring out how to use a debugger.
Logged
Re: [SDL] Tutorial help
« Reply #8 on: May 27, 2011, 01:46:31 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
yeah that what i was thinking i was just following the tutorial. @star i  debugged it , i am a beginner at C++.

this is error log
Code: [Select]
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_TUTORIAL.exe', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_image.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_ttf.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\libfreetype-6.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\zlib1.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\ddraw.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\dwmapi.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\setupapi.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\devobj.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\oleaut32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\dciman32.dll'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x304) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1a14) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1814) has exited with code 1 (0x1).
The program '[5176] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Starforsaken101

Wake the Beast
Re: [SDL] Tutorial help
« Reply #9 on: May 27, 2011, 01:53:19 am »
  • www.mouffers.com
  • *
  • Reputation: +69/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2577
yeah that what i was thinking i was just following the tutorial. @star i  debugged it , i am a beginner at C++.

this is error log
Code: [Select]
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_TUTORIAL.exe', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_image.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\SDL_ttf.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\libfreetype-6.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'D:\Users\revix2k10\Documents\Visual Studio 2010\Projects\SDL_TUTORIAL\Debug\zlib1.dll', Binary was not built with debug information.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\ddraw.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\dwmapi.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\setupapi.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\devobj.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\oleaut32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\ole32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\cfgmgr32.dll'
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\dciman32.dll'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\KBDUS.DLL', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Unloaded 'C:\Windows\SysWOW64\KBDUS.DLL'
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dsound.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\powrprof.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'SDL_TUTORIAL.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0x304) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1a14) has exited with code 1 (0x1).
The thread 'Win32 Thread' (0x1814) has exited with code 1 (0x1).
The program '[5176] SDL_TUTORIAL.exe: Native' has exited with code 1 (0x1).

I understand you're a beginner, but you still need to specify the difference between using a "debug" version of your game (vs. release) or using a debugger. Seeing as you're a beginner, I'm going to assume you're just running this in debug mode and not using breakpoints, etc. Sorry if I sound pretentious, just trying to help a bit more ;)

I think I see what's wrong. Press ALT+F7 (or right click your project and click properties, or project configurations, I don't remember seeing as I am not at work right now), and go into your Linker settings. There's a flag for generating debug information, and I'm pretty certain you have to set it to false. The thing is, in release it will even try and make the debug stuff so of course, it still crashes. I'm quite positive there is solely something wrong with your build configurations. (I'll try and help more tomorrow once I'm back at work; I don't have Visual Studio installed here).
Logged
  • Starforsaken101's DeviantART
Re: [SDL] Tutorial help
« Reply #10 on: May 27, 2011, 02:38:46 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
no i know your trying to help.i went in the linker settings -> debuggin generate debug info is set to true.

i just switched the returns to different numbers it returned 2 and this is portion of code that must be faulty

Code: [Select]
bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 72 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}
« Last Edit: May 27, 2011, 02:44:19 am by REV2K7 »
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Starforsaken101

Wake the Beast
Re: [SDL] Tutorial help
« Reply #11 on: May 27, 2011, 05:33:40 pm »
  • www.mouffers.com
  • *
  • Reputation: +69/-0
  • Offline Offline
  • Gender: Female
  • Posts: 2577
no i know your trying to help.i went in the linker settings -> debuggin generate debug info is set to true.

i just switched the returns to different numbers it returned 2 and this is portion of code that must be faulty

Code: [Select]
bool load_files()
{
    //Load the background image
    background = load_image( "background.png" );

    //Open the font
    font = TTF_OpenFont( "lazy.ttf", 72 );

    //If there was a problem in loading the background
    if( background == NULL )
    {
        return false;
    }

    //If there was an error in loading the font
    if( font == NULL )
    {
        return false;
    }

    //If everything loaded fine
    return true;
}

You have to switch the generate debugging to false. This is most likely why you're having issues (I mentioned this in my previous post).
Logged
  • Starforsaken101's DeviantART
Re: [SDL] Tutorial help
« Reply #12 on: May 27, 2011, 09:01:01 pm »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
Before worrying about your build and debug configurations, do you have background.png and lazy.ttf in your project directory? By default, that's what Visual Studio uses as the running directory when you debug from the IDE. If you're not sure how to test this, go to your folder (outside of Visual Studio), put the two files in with the EXE, and try to run it.

The way you have your load_files() function set up, you're having it fail out if it even one fails to load - you may want to add something better in the way of finding out what failed to load (when you get out of the tutorial series, of course).
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: [SDL] Tutorial help
« Reply #13 on: May 27, 2011, 09:18:58 pm »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
its in the directory.
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Re: [SDL] Tutorial help
« Reply #14 on: May 27, 2011, 09:41:51 pm »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
Can you zip/7zip and upload your project dir? Make sure you take out any sdf/opensdf files and executables.
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: [SDL] Tutorial help
« Reply #15 on: May 28, 2011, 01:31:29 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Re: [SDL] Tutorial help
« Reply #16 on: May 28, 2011, 01:34:21 am »
  • Minalien
  • *
  • Reputation: +10/-1
  • Offline Offline
  • Gender: Female
  • Posts: 2119
I'll take a look when I get back to the hotel.
Logged
Quote
There's such a double standard about religion in the modern world. Catholics can gather, wear white robes, and say "In nomine Patris, et Filii, et Spiritus Sancti" and be considered normal.

But if my friends and I gather, wear black robes, and say  "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn", we're considered cultists.
  • Development Blog
Re: [SDL] Tutorial help
« Reply #17 on: May 28, 2011, 01:39:33 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
okay thanks.
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog

Xiphirx

wat
Re: [SDL] Tutorial help
« Reply #18 on: May 28, 2011, 03:01:00 am »
  • Xiphirx
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3007
You're running it by pressing the green button in Visual Studio right?

If so, you don't have the proper files in the right place. You need to place your resources and Dlls in the SDL_TUTORIAL directory, the one that has your source code :) In this case, the folder that has main.cpp

You could go ahead and run it from the debug folder too since you have the resources and dlls in there, but this is not through the IDE.
Logged
  • For The Swarm
Re: [SDL] Tutorial help
« Reply #19 on: May 28, 2011, 03:15:25 am »
  • Hookshot to the Future!
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 517
did it same error returns 2 meaning its load_file() i am guessing.
Logged
Check my ZRPG development blog at rev2k9blog.spaces.live.com
  • My Blog
Pages: [1] 2   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.088 seconds with 78 queries.

anything