Skip to content

Conversation

@carlo-bramini
Copy link

I tried to build with arm-mingw32ce cross compiler and I got this error:

arm-mingw32ce-gcc -shared .libs/SDLnet.o .libs/SDLnetTCP.o .libs/SDLnetUDP.o .libs/SDLnetselect.o -lws2 -liphlpapi /opt/cegcc/arm-mingw32ce/lib/libSDLmain.a /opt/cegcc/arm-mingw32ce/lib/libSDL.dll.a -lmmtimer -lcoredll -lcommctrl version.o -o .libs/SDL_net.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libSDL_net.dll.a version.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status 

This happened because version.o has been compiled with the WINDRES provided by CYGWIN instead of using arm-mingw32ce-windres.
I would like to suggest to import the same code used by SDL-1.2 for detecting WINDRES.
By applying this fix, the problem has been solved.
Tested with:

  • x86_64-pc-cygwin
  • x86_64-w64-mingw32
  • i686-w64-mingw32
  • arm-mingw32ce

Perhaps, if you think that it is a good fix, it would be worth to import it also in the main branch.

I tried to build with arm-mingw32ce cross compiler and I got this error: arm-mingw32ce-gcc -shared .libs/SDLnet.o .libs/SDLnetTCP.o .libs/SDLnetUDP.o .libs/SDLnetselect.o -lws2 -liphlpapi /opt/cegcc/arm-mingw32ce/lib/libSDLmain.a /opt/cegcc/arm-mingw32ce/lib/libSDL.dll.a -lmmtimer -lcoredll -lcommctrl version.o -o .libs/SDL_net.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libSDL_net.dll.a version.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status This happened because version.o has been compiled with the WINDRES provided by CYGWIN instead of using arm-mingw32ce-windres. I would like to suggest to import the same code used by SDL-1.2 for detecting WINDRES. By applying this fix, the problem has been solved. Tested with: * x86_64-pc-cygwin * x86_64-w64-mingw32 * i686-w64-mingw32 * arm-mingw32ce Perhaps, if you think that it is a good fix, it would be worth to import it also in the main branch.
@sezero
Copy link
Contributor

sezero commented Apr 21, 2022

It should also be safe removing the $WINDRES condition around use_version_rc, like:

diff --git a/configure.ac b/configure.ac index 79a259c..c4a8a53 100644 --- a/configure.ac +++ b/configure.ac @@ -72,9 +67,7 @@ case "$host" in ac_default_prefix=$BUILD_PREFIX fi fi - if test x$WINDRES != x; then - use_version_rc=true - fi + use_version_rc=true ;; esac AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)

And all other SDL satellite projects actually need this change, both SDL-1.2 and main branches.

@sezero
Copy link
Contributor

sezero commented May 1, 2022

Fixed a little differently in git. If there are still issues, please drop a note here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants