Re: mencoder doesn't compile with xvid under cygwin
John Brown <[email protected]> Fri, 7 Dec 2007 14:45:25 -0500
| Newsgroups | gmane.comp.video.mplayer.cygwin |
|---|---|
| Message-ID | <[email protected]> |
RVM wrote: > > El Viernes, 7 de Diciembre de 2007 10:33, DEF escribió: >> On Dec 7, 2007 3:45 AM, RVM wrote: > (...) >>>> /usr/local/lib/libxvidcore.a(plugin_2pass1.obj):plugin_2pass1.c:(.text+ >>>>0x215): undefined reference to `__errno' >>>> collect2: ld returned 1 exit status >>>> make: *** [mencoder.exe] Error 1 >>>> >>>> I tried with xvidcore 1.1.3 and 1.1.0. The same problem with both. >>>> >>>> Is there any way to fix that error? >> >> Well yes. look at what the 5th elemement on your howto says. >> >> 5. Get Xvidcore (1.1.0) from and >> install it. At build/generic directory say: >> >> >> ./configure && make && make install cp *mv >> /usr/local/lib/xvidcore.a /lib/libxvidcore.a* >> >> after make install you should *not* apply this command. "mv >> /usr/local/lib/xvidcore.a /lib/libxvidcore.a " >> >> Normally I do not do that any more. and BTW, that guide is quite old. it >> first appears on the mailing list more than 2 years now. a lot has changed >> since then. > > If I don't rename xvidcore.a to libxvidcore.a then the mplayer configure > doesn't find xvid (at least with the --enable-static option, I haven't tested > without it). I don't know why the other poster thinks that you should not rename it. -lxvidcore will match libxvidcore.a, libxvidcore.dll.a, possibly xvidcore.dll (but I am not sure where the DLL should be located in order to be found in this manner) and possibly other combinations. There is a lot of information about this in the MinGW archives. However, xvidcore.a will not match, so it has to be renamed. > > (If compiling with mingw instead of cygwin, the configure does find it, but > then the binary depends on xvidcore.dll, so I also had to rename it to avoid > it). Gcc prefers shared libraries to static libraries, so if you have both, you need to take special measures to link to the static library. Specifically, put -static in your LDFLAGS. With MPlayer: configure --extra-ldflags -static. Of course, another option would be to not build the DLL in the first place (configure --enable-static --disable-shared). I'm speaking generally: some packages ignore those arguments, and some do not allow static libraries to be built. _________________________________________________________________ Your smile counts. The more smiles you share, the more we donate. Join in. www.windowslive.com/smile?ocid=TXT_TAGLM_Wave2_oprsmilewlhmtagline