Cygwin, SDL and libjpeg

Hi,

I am trying to build an application that uses SDL and libjpeg with Cygwin
tools.
My problem is that the application compiles but does a segfault when
executed. It does not even
execute the first line (cerr << “I am here” << endl;)
It seems to be a link problem. The strange point is that an application with
SDL alone compiles and runs without any problem and an application with
libjpeg and Glut works well too.
Any idea ?

Thank you by advance !
Regards,
Sylvain Lefebvre.

g++ --version
2.95.3-10
libjpeg
6b-7
sdl-config --version
1.2.5

Hi,

I am trying to build an application that uses SDL and libjpeg with Cygwin
tools.
My problem is that the application compiles but does a segfault when
executed. It does not even
execute the first line (cerr << “I am here” << endl;)
It seems to be a link problem. The strange point is that an application with
SDL alone compiles and runs without any problem and an application with
libjpeg and Glut works well too.
Any idea ?

The problem is that SDL is built without the cygwin DLL and libjpeg is.
You need to build a version of libjpeg that doesn’t have cygwin depencencies,
by passing the -mno-cygwin flag in both CFLAGS and LIBS

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment