Sign in to follow this  

cant get sdl_net and sdl_ttf to work simultaniously

Recommended Posts

i am using devC++ here is what my project linker options look like -lmingw32 -lSDLmain -lSDL ../../../../Dev-Cpp/lib/SDL_ttf.lib ../../../../Dev-Cpp/lib/libSDL_net.a here is the code
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_net.h>
SDL_Surface *screen = NULL;
int main (int argc, char *argv[])
    SDL_WM_SetCaption ("title", NULL);    
    screen = SDL_SetVideoMode (640, 480, 32, SDL_DOUBLEBUF | SDL_ANYFORMAT | SDL_HWSURFACE);
    return 0;

am i forgetting some fundamental detail? it compiles fine and dandy. if i comment out both TTF_Init() and TTF_Quit() OR if i comment out both SDLNet_Init() and SDLNet_Quit() then the program runs fine (as minimal as 'fine' may be at this time) the second i try to use functions from both libraries i get the following error upon execution. Application Failure The application failed to initialize properly (0xc0000005). Click on OK to terminate the application. [OK] iterestingly enough it prompts me for this twice. looking up this error in the system event log in windows tells me that this code has to do with access permissions...permission of what - i still dont know. please help or post replacement code for getting both libraries to work together. im just trying to make a basic SDL chat >_< also - i know i have sdl_net and sdl_ttf installed correctly because if have created and run functional programs using each separatly. thank in advance, Cody

Share this post

Link to post
Share on other sites
If you're trusting in the package manager for DevC++ then you probably don't have the latest versions of each package. You might try hand-installing the latest versions of all the libraries to make sure they will work together.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this