SDL_net with mingw32/Dev-cpp

Hi all,
I would like to link my program against SDL_net. I am using Dev-cpp
4.9.9.2 and SDL 1.2.9 (from devpaks.org) on Windows XP SP2. I try to
link against the VC6 binary file from the SDL_net website.

Compiling and linking works without errors. When debugging the program
from Dev-cpp, it crashes with a segmentation fault. Starting the .exe
manually (with SDL.dll and SDL_net.dll in place), Windows gives the message:

“Die Anwendung konnte nicht richtig initialisiert werden (0xc0000005).
Klicken Sie auf ‘OK’, um die Anwendung zu beenden.”

which is something like

“The application could not be initialized correctly (0xc0000005). Click
’OK’ to quit the application.”

Can anybody help with this? Many thanks!

Bj?rn Fischer

Hello Bj?rn,

Thursday, May 4, 2006, 9:12:51 PM, you wrote:

BF> Hi all,
BF> I would like to link my program against SDL_net. I am using Dev-cpp
BF> 4.9.9.2 and SDL 1.2.9 (from devpaks.org) on Windows XP SP2. I try to
BF> link against the VC6 binary file from the SDL_net website.

BF> Compiling and linking works without errors. When debugging the program
BF> from Dev-cpp, it crashes with a segmentation fault. Starting the .exe
BF> manually (with SDL.dll and SDL_net.dll in place), Windows gives the message:

BF> “Die Anwendung konnte nicht richtig initialisiert werden (0xc0000005).
BF> Klicken Sie auf ‘OK’, um die Anwendung zu beenden.”

BF> which is something like

BF> “The application could not be initialized correctly (0xc0000005). Click
BF> ‘OK’ to quit the application.”

BF> Can anybody help with this? Many thanks!

BF> Bj?rn Fischer

You need to build both SDL and SDL_net with Dev-C++ or from the
command line with mingw, as the VC6 compiled libs and library imports
will not be compatible with mingw (a modified gcc compiler).–
Best regards,
Peter mailto:@Peter_Mulholland

Peter Mulholland escreveu:

You need to build both SDL and SDL_net with Dev-C++ or from the
command line with mingw, as the VC6 compiled libs and library imports
will not be compatible with mingw (a modified gcc compiler).

I never had any problem running or debugging any SDL (with and without
SDL_net) with MinGW.
I would guess that the problem is either with Dev-C++ (the debug support
is terrible), gdb (maybe incompatible with the gcc used to build the
program) or a broken DLL.

Some hints:

  • use the official DLLs, both for SDL and SDL_net.
  • Make sure you are using recent GCC and GDB versions.
  • Use another IDE with better debugging capabilities.—
    Daniel K. O.

Daniel K. O. schrieb:

Peter Mulholland escreveu:

You need to build both SDL and SDL_net with Dev-C++ or from the
command line with mingw, as the VC6 compiled libs and library imports
will not be compatible with mingw (a modified gcc compiler).

I never had any problem running or debugging any SDL (with and without
SDL_net) with MinGW.
I would guess that the problem is either with Dev-C++ (the debug support
is terrible), gdb (maybe incompatible with the gcc used to build the
program) or a broken DLL.

Some hints:

  • use the official DLLs, both for SDL and SDL_net.
  • Make sure you are using recent GCC and GDB versions.
  • Use another IDE with better debugging capabilities.

Hi Daniel,
hint no. 1 worked perfectly. My fault was mixing a dev-cpp package (SDL)
with official SDL_net.

Thanks for your help.

Bj?rn