[XviD-devel] Re[2]: Compiling xvidcore with MinGW

Milos Spasovic xvid-devel@xvid.org
Mon, 21 Oct 2002 04:04:14 +0200


Hi,

> xvidcore did not compile cleanly with mingw before september.
> the latest stable code, which can be downloaded through cvs, will
> compile under mingw.

Yes, you are right. But as I already said I managed to compile stable
branch. First time I compiled it with mingw was about a month ago when
Edouard rewrited portab.h and it compiles perfectly well without any
errors. Also, I forgot to mention that I was using portab.h from stable
branch instead of portab.h from development branch because it's
impossible to do anything with that version under mingw.

> in future please singup/mail to xvid-devel@xvid.org.

Yes, I already know about xvid-devel mailing list and I signed up the
very first day it became public. In fact I already posted some things
here before. The reason I mailed just you was that I didn't want to
bother all developers about this very minor thing and because you
added mingw makefiles to CVS so I thought if someone knows how to
solve this thing it must be Peter :-)

> the stable codebase nolonger provides bframe encoding.
> if you want to use the bframes stuff, you will need to checkout the
> development branch ("xvid-api3-dev"). however this branch does not
> yet compile cleanly with mingw... i will look into fixing this.
> (though doing this is redundant, because when the dev-branch is
> eventually merged into the stable/cvs_head, the original mingw fixes
> will take affect)

It looks like you misunderstood me (thats OK, because people
misunderstand me all the time :-)) because I was already trying to
compile development branch and thats how I got those errors.

I was just reading through bitstream.c because that is where gcc exits
with error code (function log2bin) and I found this line #ifndef WIN32
so I looked in bitstream.c from stable branch and there was this line
#if !defined(_MSC_VER) which I remember I saw somewhere before so I
looked through some old mails from this list and I found that you
Peter applied this patch specificly because of mingw. So I did the
same thing and bitstream.c compiled without the previous error but
unfortunately I got another error:

gcc -Wall -DARCH_X86   -c -o ../../src/image/font.o ../../src/image/font.c
../../src/image/font.c: In function `image_printf':
../../src/image/font.c:533: `va_list' undeclared (first use in this function)
../../src/image/font.c:533: (Each undeclared identifier is reported only once
../../src/image/font.c:533: for each function it appears in.)
../../src/image/font.c:533: parse error before "args"
../../src/image/font.c:535: `size_t' undeclared (first use in this function)
../../src/image/font.c:535: parse error before "i"
../../src/image/font.c:537: warning: implicit declaration of function `va_start'

../../src/image/font.c:537: `args' undeclared (first use in this function)
../../src/image/font.c:538: warning: implicit declaration of function `vsprintf'

../../src/image/font.c:540: `i' undeclared (first use in this function)
../../src/image/font.c:540: warning: implicit declaration of function `strlen'
C:\MINGW\BIN\MINGW3~4.EXE: *** [../../src/image/font.o] Error 1

I have absolutely no idea what to do here, so if someone knows please
say how can I solve this thing.

Thankyou for your help,
Milos