Little problem with mingw32

Hi,

I tried cross-compiling SDL to windows. The entire compilation process
seems to go fine. However, I do have a problem compiling the test programs.

First, this happens:

/usr/local/cross-tools/i386-mingw32/lib/libSDL.a: could not read symbols: Archive has no index; run ranlib to add one

After running /usr/local/cross-tools/i386-mingw32/bin/ranlib on it, I try
again and get:

[root at serhat test]# make target=win32
/usr/local/cross-tools/bin/i386-mingw32-gcc -g -O2 -I/usr/local/cross-tools/i386-mingw32/include -Dmain=SDL_main -o checkkeys checkkeys.o -L/usr/local/cross-tools/i386-mingw32/lib -lSDL -lSDLmain
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_sysevents.lo): In function SDL_RegisterApp': /home/coredev/libs/2d/SDL/src/video/windib/SDL_sysevents.c:550: undefined reference toGetStockObject at 4’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_SetTimer': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:101: undefined reference totimeSetEvent at 20’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_TimerInit': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:116: undefined reference totimeBeginPeriod at 4’
… etc etc etc

I used the latest CVS version of SDL (downloaded on Oct 28th) and the latest
compiler tools.

What am I doing wrong here??? :slight_smile:

Regards,

Serhat Sakarya

root wrote:

Hi,

I tried cross-compiling SDL to windows. The entire compilation process
seems to go fine. However, I do have a problem compiling the test programs.

First, this happens:

/usr/local/cross-tools/i386-mingw32/lib/libSDL.a: could not read symbols: Archive has no index; run ranlib to add one

After running /usr/local/cross-tools/i386-mingw32/bin/ranlib on it, I try
again and get:

[root at serhat test]# make target=win32
/usr/local/cross-tools/bin/i386-mingw32-gcc -g -O2 -I/usr/local/cross-tools/i386-mingw32/include -Dmain=SDL_main -o checkkeys checkkeys.o -L/usr/local/cross-tools/i386-mingw32/lib -lSDL -lSDLmain
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_sysevents.lo): In function SDL_RegisterApp': /home/coredev/libs/2d/SDL/src/video/windib/SDL_sysevents.c:550: undefined reference toGetStockObject at 4’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_SetTimer': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:101: undefined reference totimeSetEvent at 20’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_TimerInit': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:116: undefined reference totimeBeginPeriod at 4’
… etc etc etc

I used the latest CVS version of SDL (downloaded on Oct 28th) and the latest
compiler tools.

What am I doing wrong here??? :slight_smile:

You’re not doing anything wrong. The new cross-compiler build process
is broken. I have updated code in the Loki CVS repository, which I will
announce after I finish working on the network here.–
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

root wrote:

Hi,

I tried cross-compiling SDL to windows. The entire compilation process
seems to go fine. However, I do have a problem compiling the test programs.

First, this happens:

/usr/local/cross-tools/i386-mingw32/lib/libSDL.a: could not read symbols: Archive has no index; run ranlib to add one

After running /usr/local/cross-tools/i386-mingw32/bin/ranlib on it, I try
again and get:

[root at serhat test]# make target=win32
/usr/local/cross-tools/bin/i386-mingw32-gcc -g -O2 -I/usr/local/cross-tools/i386-mingw32/include -Dmain=SDL_main -o checkkeys checkkeys.o -L/usr/local/cross-tools/i386-mingw32/lib -lSDL -lSDLmain
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_sysevents.lo): In function SDL_RegisterApp': /home/coredev/libs/2d/SDL/src/video/windib/SDL_sysevents.c:550: undefined reference toGetStockObject at 4’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_SetTimer': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:101: undefined reference totimeSetEvent at 20’
/usr/local/cross-tools/i386-mingw32/lib/libSDL.a(SDL_timer.lo): In function SDL_TimerInit': /home/coredev/libs/2d/SDL/src/timer/SDL_timer.c:116: undefined reference totimeBeginPeriod at 4’
… etc etc etc

I used the latest CVS version of SDL (downloaded on Oct 28th) and the latest
^^^^^^^^^^^^^^^^^^^^^^^^^

What else would you expect? Sir, it’s very possible that this asteroid
is not stable. :slight_smile:

compiler tools.

What am I doing wrong here??? :slight_smile:

Try using one of the stable releases instead of a bleeding edge off the
CVS one. It seems that Sam broke part of the cross-compile build. As
the old adage goes, if you like being on the bleeding edge, prepare to
bleed a little! (more than a little is more accurate methinks!)–

| Rafael R. Sevilla @Rafael_R_Sevilla |
| Instrumentation, Robotics, and Control Laboratory |

College of Engineering, University of the Philippines, Diliman

Rafael R. Sevilla wrote:

root wrote:

[snip]

What else would you expect? Sir, it’s very possible that this asteroid
is not stable. :slight_smile:

chuckle But… but… I read in another post that the latest version had
better win32 support? :wink:

Anyway… maybe my post was remotely useful somehow as feedback, so I’ll
use that as a comforting thought :wink:

Regards,

Serhat Sakarya