[XviD-devel] xvid_bench link error

JerryChen jerrychen at ustc.edu
Fri Apr 9 20:06:16 CEST 2004


> Date: Fri,  9 Apr 2004 11:15:44 +0200
> From: Edouard Gomez <ed.gomez at free.fr>
> Subject: Re: [XviD-devel] xvid_bench link error
> To: xvid-devel at xvid.org
> Message-ID: <1081502144.407669c0a2cf1 at imp6-q.free.fr>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> Quoting JerryChen <jerrychen at ustc.edu>:
> >     when build xvid_bench.dsp,i got a link error. Such files
> >  like idct,fdct are unresolved external symbols. I check the
> >   xvidcore.dll.a ,find that such function pointer are not announced.
> >  How could i make the xvid_bench build? 
> >     Thanks for your advice.
> 
> Yeah it's something that changed when we decided to have a dll for 
> xvidcore.
> 
> xvid_bench requires static linking to xvidcore, so maybe we could add
> a static lib build target to the xvidcore.dsp file, so win32 users can
> also compile and test core funcs with xvid_bench. Someone ?
> 
> --
> Edouard Gomez
it seems that  xvidcore-1.0.0-rc4\build\generic\libxvidcore.def only exports
9 functions,such as:
EXPORTS
 xvid_global; 
 xvid_decore; 
 xvid_encore; 
 xvid_plugin_single;
 xvid_plugin_2pass1;
 xvid_plugin_2pass2;
 xvid_plugin_lumimasking; 
 xvid_plugin_dump; 
 xvid_plugin_psnr; 
so other functions like: idct,fdct are unresolved external symbols.

so i try to modify the libxvidcore.def to extern more functions, no more link errors now.
But when run xvid_bench.exe,runtime error happened.  Because functions link emms,idct,fdct... 
are dynamically decided, make a static lib seems not a good idea. So i move the xvid_bench.c to the
xvidecore project and change the entry main() to xvid_bench(), export it in libxivdcore.def. In my 
test_bench function, call xvid_bench(argc,argv) directly.
It works now. But certianly this is not a good method, maybe someone else can do it in a more reasonable way.


More information about the XviD-devel mailing list