-mno-cygwin and SDL

CaetSith7 at aol.com wrote:

ptsekov at syntrex.com wrote:

CaetSith7 at aol.com wrote:

Hi, I downloaded and compiled SDL-1.2.3 from source in cygwin, and
suprisingly I got it to work. Then I tried to set -mno-cygwin so that the
app would work outside of Cygwin, but I get:

$ make win
gcc test1.C -mno-cygwin -I /usr/include -lglut32 -lglu32 -lopengl32 -lSDL
-o exec/test1.exe

The line above should be changed like this:
gcc test1.C -mno-cygwin -I /usr/include -o exec/test1.exe -lglut32
-lglu32 -lopengl32 -lSDL

Read the FAQ on cygwin.com it contains a topic on WinMain at 16.

I tried your suggestion, but I get the same error. I also looked at the FAQ,
it did not give me any clues either.

Shawn Lindberg

I modified my compile commands as per the SDL FAQ so that they it is now:

gcc test1.C -mno-cygwin -I /usr/include -o exec/test1.exe -lglut32 -lglu32 -lopengl32 sdl-config --cflags --libs

However, now I get the errors:

In file included from /usr/include/SDL/SDL_rwops.h:35,
from /usr/include/SDL/SDL.h:37,
from test1.C:19:
/usr/include/stdio.h:157: type specifier omitted for parameter
/usr/include/stdio.h:158: type sepcifier omitted for parameter

and so on for lines 159, 189, 194-197, 246-252.

Any ideas?

Shawn Lindberg

I modified my compile commands as per the SDL FAQ so that they it is now:

gcc test1.C -mno-cygwin -I /usr/include -o exec/test1.exe -lglut32 -lglu32 -lopengl32 sdl-config --cflags --libs

However, now I get the errors:

In file included from /usr/include/SDL/SDL_rwops.h:35,
from /usr/include/SDL/SDL.h:37,
from test1.C:19:
/usr/include/stdio.h:157: type specifier omitted for parameter
/usr/include/stdio.h:158: type sepcifier omitted for parameter

Ouch, you’re using both glut and SDL?
Also, it looks like you have a bad set of C library headers. What compiler
setup are you using? The latest release of Cygwin, and the compiler on the
SDL cross-compiler page should both work. I recommend Cygwin, since it’s
more up to date.

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

Try changing the -I /usr/include to -I /usr/include/mingw

Mumit Khan had some notes somewhere on using -mno-cygwin, I think …On Wed, Dec 05, 2001 at 03:46:41PM -0500, CaetSith7 at aol.com wrote:

CaetSith7 at aol.com wrote:

I modified my compile commands as per the SDL FAQ so that they it is now:

gcc test1.C -mno-cygwin -I /usr/include -o exec/test1.exe -lglut32 -lglu32 -lopengl32 sdl-config --cflags --libs

However, now I get the errors:

In file included from /usr/include/SDL/SDL_rwops.h:35,
from /usr/include/SDL/SDL.h:37,
from test1.C:19:
/usr/include/stdio.h:157: type specifier omitted for parameter
/usr/include/stdio.h:158: type sepcifier omitted for parameter

and so on for lines 159, 189, 194-197, 246-252.

Any ideas?


Greg V. (hmaon)

When I removed the -I /usr/include it seemed to compile fine (the test1.C is just a skeleton so I’ll have to test more later). Thanks for the help,

Shawn Lindberg