xvid庫在vc8.0下的編譯

以前都是在vc6.0下編譯xvid庫,最近在vc8.0下編譯卻出現兩個錯誤,具體如下:

錯誤1: crtdefs.h(448) : error C2632: 'int' followed by 'int' is illegal

錯誤信息:

1>vop_type_decision.c
1>D:/Program Files/Microsoft Visual Studio 8/VC/include/crtdefs.h(448) : error C2632: 'int' followed by 'int' is illegal
1>D:/Program Files/Microsoft Visual Studio 8/VC/include/crtdefs.h(448) : warning C4091: 'typedef ' : ignored on left of '__w64 int' when no variable is declared

解決辦法:

修改portab.h頭文件,對intptr_t定義稍作處理,如下:

#if defined(ARCH_IS_32BIT)
#    define CACHE_LINE 64
#    define ptr_t uint32_t
#    define intptr_t int32_t
#    define _INTPTR_T_DEFINED // !!! add this definition
#    if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#        include <stdarg.h>
#    else
#        define uintptr_t uint32_t
#    endif
#elif defined(ARCH_IS_64BIT)

錯誤2:nasm: error: no input file specified

錯誤信息:

1>Assembling e:/NodSoftware/StreamPlayerSDK/mmpeg4_xvid/xvid/xvidcore-1.0.2/src/image/x86_asm/colorspace_yuyv_mmx.asm
1>nasm: error: no input file specified
1>type `nasm -h' for help
1>Project : error PRJ0019: A tool returned an error code from "Assembling e:/NodSoftware/StreamPlayerSDK/mmpeg4_xvid/xvid/xvidcore-1.0.2/src/image/x86_asm/colorspace_yuyv_mmx.asm"

解決辦法:

修改以下三個文件的編譯選項

colorspace_rgb_mmx.asm
colorspace_yuv_mmx.asm
colorspace_yuyv_mmx.asm

nasm -f win32 -DPREFIX -I$"(InputDir)"/ -o $(IntDir)/$(InputName).obj $(InputPath)

改爲

nasm -f win32 -DPREFIX -I$(InputDir) -o $(IntDir)/$(InputName).obj $(InputPath)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章