Hi, I've taken the 1.1.2 release off the xvid site.
On Wed, 2007-03-28 at 12:15 +0800, Hudson Hsueh wrote: > I want to cross-compile Xvid codec(http://www.xvid.org/)(from svn) > with cegcc(compiled from svn) for my WM 5.0 device, > I tried for several days and now I was stuck on some problem. > > Following is My configure command, > > ./configure CC=/opt/cegcc/bin/arm-wince-cegcc-gcc --host=arm I don't think that'll do what you want. Try this : % setenv CC arm-wince-cegcc-gcc % ./configure --host=i586-gnu-linux --target=arm-wince-cegcc You'll note that platform.inc then contains the right CC= line, I mean it'll say the compiler is arm-wince-cegcc-gcc. It doesn't mention the right ranlib though. Similarly the Makefile uses $(AS), so I tried again but also specified % setenv RANLIB arm-wince-cegcc-ranlib % setenv AS arm-wince-cegcc-as and then % ./configure --host=i586-gnu-linux --target=arm-wince-cegcc % make Running this compiles some of the sources, then fails with : L: libxvidcore.so Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import) /opt/cegcc/lib/gcc/arm-wince-cegcc/4.1.0/../../../../arm-wince-cegcc/lib/libcegcc.dll.a(main.o):main.c:(.text+0x28): undefined reference to `WinMain' collect2: ld returned 1 exit status gmake: *** [libxvidcore.so] Error 1 This is the error you were getting too. The reason is that the xvid configure script tries to figure out what your build environment is, and adds some platform specific stuff in e.g. SPECIFIC_LDFLAGS. Look at line 267 and further in configure.in. I've added a couple of lines saying : cegcc*) AC_MSG_RESULT([ok]) STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)" SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\ $(API_MINOR)" SPECIFIC_LDFLAGS="-shared -lc -lm" SPECIFIC_CFLAGS="" ;; and then ran % autoreconf % ./configure --host=i586-gnu-linux --target=arm-wince-cegcc % make This ended with : L: libxvidcore.a L: libxvidcore.so.4.1 --------------------------------------------------------------- XviD has been successfully built. * Binaries are currently located in the '=build' directory * To install them on your system, you can run '# make install' as root. --------------------------------------------------------------- I assume I've answered the "howto" question, but have I also given you enough info to understand the problem and the solution ? Cheers, Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel