How to compile SDL in MINGW?

How to compile SDL in MINGW?

How to build the environment of MSYS for the crossing compiler? ” has introduced how to establish the environment of MINGW in Windows. It works well in the normal daily activities, however, it fails to call ‘autogen.sh ’ shell script to generate configure file. Readers maybe find the similar errors information as follows.

$ ./autogen.sh

Generating build information using autoconf

This may take a while ...

/mingw/bin/autoconf: line 582: /usr/bin/autom4te: No such file or directory

/mingw/bin/autoconf: line 582: exec: /usr/bin/autom4te: cannot execute: No such file or directory

Couldn't find autoconf, aborting

 

After investigating the errors, the root cause is obtained. The wrong settings in the ‘autoconf ’ lead to miss the related configuration. Three files are listed in the table.

1. /mingw/bin/autoconf

2. /mingw/bin/autom4te

3. /mingw/share/autoconf/autom4te.cfg

 

Ok, the reason has been found, so how to solve it?

 

There are two ways to get ride of this case.

1. Open three files: ‘/mingw/bin/autoconf ’, ‘/mingw/bin/autom4te ’ and ‘/mingw/share/autoconf/autom4te.cfg’.

 

Substitutes ‘/mingw/share’ for ‘/usr/share’ and ‘/mingw/bin’ for ‘/usr/bin’. Although it is a simple operation by using the ‘replace’ command in the menu item, it looks a bit stupid:- (.

 

2. Map the folders.

 

As MSYS has provided this mechanism, we should make full use of it.

Open ‘/etc/fstab ’ file, and append two entries as follows.

XXX/YYY/mingw    /mingw

XXX/YYY/mingw/bin    /usr/local/bin

XXX/YYY/mingw /share    /usr/local/share

 

How to compile SDL?

 

 

1. Download it by SVN tool

$ svn checkout http://svn.libsdl.org/trunk/SDL

2. Configure it

$ cd ./SDL

$ ./autogen.sh

$ ./configure –prefix=/mingw –disable-shared –enable-static –enable-sse2 –enable-ssemath

3. Compile it

$ make

4. Install it

$ make install

 


[Summarization]

1. if ‘/usr ’, /local ’, /local/bin ’ and ‘/local/share ’ have not been created in the local file system, please create these folders firstly.

2. The original folders must be the real local folders, and virtual folders do not work well. For example, if we define them as below, it will not be recognized.

/ming/bin     /usr/local/bin

/ming/share   /usr/local/share

3. Try to use simple solution when options are available, and the second is preferable in this case.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值