[XviD-devel] Question on asm code

Kurosu kurosu at inforezo.org
Wed Mar 3 11:16:21 CET 2004


On Wed, 3 Mar 2004, Jacky Yuk wrote:
> Furthermore, it seems that the symbols of global functions and variables
> cannot be recognized by vc++ when linking to the compiled objects since
> vc++ is finding the symbols with an underscore ( _ ) as the prefix.
> Could anyone please kindly teach me how to solve such problems insttead
> of manually change the names by adding the " _ " preifx in the asm code.

Maintainers/developpers will correct me, but you need to call nasm with:
-DPREFIX -DWIN32

Open one .asm file and you will see that, depending on those defines
(you'll be able to find the right ones if the ones I gave aren't the ones
needed), the macro cglobal properly add the "_" to the function name. This
is needed because the asm functions are declared as extern "C" and that's
how VC++ handles those declarations, btw (ie building with gcc doesn't
need that).

-- 
Kurosu (Kurosu (at) inforezo dot org)
"Reality ? Is that where the pizza delivery guy comes from ?"


More information about the XviD-devel mailing list