[MPlayer-users] Compilation error 'conflicting types for 'swab'

turbos10 turbos11 at gmail.com
Tue Apr 19 10:11:34 CEST 2011


On 4/18/11, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Does the following line after the 'define_statement_check' line in the
> 'echocheck "swab()"' section help?
> define_statement_check "A A" "string.h" 'int a, b; swab(&a, &b, 0)' &&
> _swab=yes

I replace  unistd.h to string.h in configure and it work.

##########################################

============ Checking for swab() ============

#define _XOPEN_SOURCE 600
#include <string.h>
int main(void) { int a, b; swab(&a, &b, 0); return 0; }

gcc -Wundef -Wall -Wno-switch -Wno-parentheses -Wpointer-arith
-Wredundant-decls -Werror-implicit-function-declaration
-Wstrict-prototypes -Wmissing-prototypes -Wdisabled-optimization
-Wno-pointer-sign -Wdeclaration-after-statement -std=gnu99  -O4
-march=i486 -mtune=generic -pipe -ffast-math -fomit-frame-pointer
/tmp/mplayer-configure-26474-2312/tmp.c -I. -Iffmpeg  -fno-common
-static  -lwinmm -ffast-math -lws2_32 -liconv   -o
/tmp/mplayer-configure-26474-2312/tmp.exe
I:/DOCUME~2/ADMINI~1/USTAWI~1/Temp/mplayer-configure-26474-2312/tmp.c:
In function 'main':
I:/DOCUME~2/ADMINI~1/USTAWI~1/Temp/mplayer-configure-26474-2312/tmp.c:3:
warning: passing argument 1 of 'swab' from incompatible pointer type
I:/DOCUME~2/ADMINI~1/USTAWI~1/Temp/mplayer-configure-26474-2312/tmp.c:3:
warning: passing argument 2 of 'swab' from incompatible pointer type


Result is: yes
##########################################

>> MinGW Build Environment with gcc 4.2.5  is from site
>> http://oss.netfarm.it/mplayer-win32.php
>> Ffmpeg i get from
>> http://www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
>
> Why? (configure should pick it up automatically for you.)

I don't have git client.  "./configure: line 53: git: command not found
Failed to get a FFmpeg checkout".
You know how to install git client to MinGW?
I think that git source and url is identical.
Ffmpeg source I copy to mplayer source folder. I first configure
ffmpeg, next configure mplayer, next make mplayer. Do I  compile it
correctly?
Sorry for bad English

On 4/18/11, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> turbos10 <turbos11 <at> gmail.com> writes:
>
>> In file included from libmpdemux/aviheader.h:26,
>>                 from libmpdemux/stheader.h:23,
>>                 from command.c:29:
>> ./mpbswap.h:35: error: conflicting types for 'swab'
>> i:/mingw/include/string.h:115: error: previous declaration of 'swab' was
>> here
>> command.c: In function 'run_command':
>> command.c:3457: error: implicit declaration of function 'strsep'
>> command.c:3457: warning: assignment makes pointer from integer without a
>> cast
>> make: *** [command.o] Error 1
>
> Only suspicions:
> swab is defined in string.h instead of unistd.h, but MPlayer configure only
> checks in unistd.h
> http://sourceware.org/ml/newlib/2000/msg00247.html
> Does the following line after the 'define_statement_check' line in the
> 'echocheck "swab()"' section help?
> define_statement_check "A A" "string.h" 'int a, b; swab(&a, &b, 0)' &&
> _swab=yes
> (And could you add the 'Checking for swab()' section of config.log?)
>
>> MinGW Build Environment with gcc 4.2.5  is from site
>> http://oss.netfarm.it/mplayer-win32.php
>> Ffmpeg i get from
>> http://www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
>
> Why? (configure should pick it up automatically for you.)
>
> Carl Eugen
>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>


More information about the MPlayer-users mailing list