project-navigation
Personal tools

Author Topic: MinGW cross-compilation - how exactly?  (Read 2404 times)

MANic

  • Guest
MinGW cross-compilation - how exactly?
« on: October 27, 2008, 12:40:57 pm »
I have been attempting to cross-compile UFO:AI to Windows using MinGW, and have hit a major stumbling block, that neither Google nor the manpages seem to be able to answer.

I have installed the MinGW package, compiled and installed the additional developer libraries, added /usr/i586-mingw32msvc to PATH, and yet whenever I run the configure script I get
Code: [Select]
./configure --host=i586-mingw32msvc --with-sdl-prefix=/usr/i586-mingw32msvc
...
{stuff}
...
checking for sdl-config... yes
checking SDL.h usability... no
checking SDL.h presence... no
checking for SDL.h... no
configure: error: You must have the SDL development headers

Does anyone have any suggestions/tips/detailed-step-by-step-handwalk-me-through-it-instructions (the latter would be very much preferred)?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: MinGW cross-compilation - how exactly?
« Reply #1 on: October 27, 2008, 05:55:06 pm »
isn't there --with-sdl-config?

it's not tested for quite some time now - if you could improve something on the cross-compilation lib finding:
* configure.ac editing
* autoconf
* ./configure --host.....
feel free to send patches.

MANic

  • Guest
Re: MinGW cross-compilation - how exactly?
« Reply #2 on: October 27, 2008, 09:53:50 pm »
If I specify --with-sdl-config={foo}, it tells me that it can't locate the SDL config, even though it is in my PATH, and it still "can't find" it even when I give it a full path to the sdl-config in MinGW.

Offline RudolfoWood

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: MinGW cross-compilation - how exactly?
« Reply #3 on: October 29, 2008, 09:29:14 am »
http://ufoai.ninex.info/wiki/index.php/Talk:MinGW

I have had the same problem. Fixed it by creating a symlink (step 3)

doc.torr

  • Guest
Re: MinGW cross-compilation - how exactly?
« Reply #4 on: November 30, 2008, 11:13:04 pm »
Hi, all,

I get similar problems compiling on Mac OS X 10.5 (BASH Terminal) with Fink.

SDL etc is installed, but similar usability/presence and compiler/preprocessor and configure errors.

I'm beginning to think it's a cross-compilation problem, given I've got everything installed good (I think), but still get 'error [1]' after make

Any suggestions?