symbian .mmp文件中区分SDK版本

    技术2025-01-17  7

    1.从你第五版SDKEpoc32/include/variant/下拷贝symbian_os.hrh文件至工程的bld.inf所处目录(一般都是group目录),并改名为symbian_os_mod.hrh以示区分。

    编辑这个symbian_os_mod.hrh文件,在最后加上

    /**

     * modified by Coastline

     * you can use the following macro to determine S60_5th in mmp

     */

    #ifndef S60_5TH

    #define S60_5TH

    #endif

     

    2.bld.inf所处目录新建DetermineSDKVersion.mk文件,内容如下:

    # ============================================================================

    #  Name    : DetermineSDKVersion.mk

    #  Part of  : 

    #  Author :

    #  Description: 

    # ============================================================================

    do_nothing :

        @rem do_nothing

     

    MAKMAKE : do_nothing

     

    BLD : do_nothing

    ifeq (S60_5th,$(findstring S60_5th, $(EPOCROOT)))

        @echo ----------symbian_os.hrh replaced----------

        copy symbian_os_mod.hrh  $(EPOCROOT)/epoc32/include/variant/symbian_os.hrh

    endif

     

    CLEAN : do_nothing

     

    LIB : do_nothing

     

    CLEANLIB : do_nothing

     

    RESOURCE : do_nothing

     

    FINAL : do_nothing

     

    3.bld.inf中加上下面两行:

    PRJ_MMPFILES

        gnumakefile DetermineSDKVersion.mk

    注,这两行最好放在你实际所使用的mmp之前(如图)。

     

    4.可以在项目的mmp中使用S60_5TH这个宏:

    #ifdef S60_5TH

    LIBRARY OOXX.lib

    #else

    LIBRARY XXOO.lib

    #endif

    最新回复(0)