完成xvid1.2.1移植到windows mobile平台

來源:互聯網
上載者:User

 /********************此文可以被轉寄,但請轉寄者保留作者的署名權
****李浩
****msn:lihao_nx@hotmail.com
****
****email:lihaoyxj@gmail.com
****出處:lihaoyxj.cublog.cn
****from:http://blog.csdn.net/lihao_ningxia
*****************/
    今天早上終於將xvid1.2.1移植到windows mobile平台上,雖然還沒有測試,不過先把這部分的移植方式共用出來。
    下載xvid1.2.1就不用說了,它裡邊一個是WIN32項目,另一個是通用的基於LINUX等的。
    肯定是要建立一個windows mobile lib空項目了.
    然後把除過plugins檔案夾下的所有檔案加到項目中,如下:


然後把portab.h中的這一段相關代碼改成如下
#if defined(ARCH_IS_32BIT)
#    define CACHE_LINE 64
#    define ptr_t uint32_t
#    define intptr_t int32_t
#    define _INTPTR_T_DEFINED
//這個注釋有必要
//#    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)
#    define CACHE_LINE  64
#    define ptr_t uint64_t
#    define intptr_t int64_t
#    define _INTPTR_T_DEFINED
#    if defined (_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#        include <stdarg.h>
#    else
#        define uintptr_t uint64_t
#    endif
#else
#    error You are trying to compile XviD without defining address bus size.
#endif

再把先行編譯條件改成如下:
NDEBUG
_WIN32_WCE=$(CEVER)
UNDER_CE
$(PLATFORMDEFINES)
WINCE
_LIB
$(ARCHFAM)
$(_ARCHFAM_)
_UNICODE
UNICODE
ARCH_IS_GENERIC//add
ARCH_IS_32BIT//add

好了就可以這樣編譯了,如果過程中遇到彙編不能過,就先彙編注釋掉,畢竟X86和ARM的彙編不一樣的。我在堅持自己不能光吃一頓魚,而是要學會捕魚,希望大家也能順利。至於編譯的庫能否使用,正確使用等測試後再說吧。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.