# cant get sdl_net and sdl_ttf to work simultaniously

This topic is 4104 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i am using devC++ 4.9.9.2 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_Init (SDL_INIT_EVERYTHING);
SDL_WM_SetCaption ("title", NULL);
screen = SDL_SetVideoMode (640, 480, 32, SDL_DOUBLEBUF | SDL_ANYFORMAT | SDL_HWSURFACE);
TTF_Init();
SDLNet_Init();
SDLNet_Quit();
TTF_Quit();
SDL_Quit();
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 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 on other sites
can anyone else at least try to compile this and see if they get the same error?
im dying here