zoukankan      html  css  js  c++  java
  • cocos sdkbox android 接入注意

    1 jin/Android.mk  中 LOCAL_SRC_FILES 链接的是runtime-src/Classes中的cpp文件

    2  jin/Android.mk 若 LOCAL_LDLIBS := -landroid -llog 则Eclips可看到cocos2d.o的编译信息,编译速度较慢

    3 sdk的java文件要用LOCAL_WHOLE_STATIC_LIBRARIES :=  加载静态库 

    大概这样:只接了 facebook

    LOCAL_PATH := $(call my-dir)
    
    include $(CLEAR_VARS)
    
    LOCAL_MODULE := cocos2djs_shared
    
    LOCAL_MODULE_FILENAME := libcocos2djs
    
    LOCAL_SRC_FILES := hellojavascript/main.cpp ../../Classes/AppDelegate.cpp ../../Classes/PluginFacebookJS.cpp ../../Classes/PluginFacebookJS.hpp ../../Classes/PluginFacebookJSHelper.cpp ../../Classes/PluginFacebookJSHelper.h ../../Classes/SDKBoxJSHelper.cpp ../../Classes/SDKBoxJSHelper.h
    
    #LOCAL_LDLIBS := -landroid -llog
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
    
    LOCAL_WHOLE_STATIC_LIBRARIES := PluginFacebook sdkbox
    
    LOCAL_STATIC_LIBRARIES := cocos2d_js_static
    
    LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT
    
    include $(BUILD_SHARED_LIBRARY)
    $(call import-add-path, $(LOCAL_PATH))
    
    $(call import-module, scripting/js-bindings/proj.android)
    $(call import-module, ./sdkbox)
    $(call import-module, ./pluginfacebook)

    4工程链接第三方库文件需要在project.properties中添加路径

    target=android-17
    
    android.library.reference.1=../../cocos2d-x/cocos/platform/android/java
    android.library.reference.2=./libs/facebook_lib

    当然工程中需要import 此lib

    Eclips 右键 Package Explorer,点击import 选择工程文件夹,选择需要导入的库

  • 相关阅读:
    UVA 10391 STL容器的使用
    UVA 10763
    UVA 10935
    UVA 洪水
    UVA 1594 set 里面放queue
    关于STL 容器的嵌套使用, 小试牛刀
    丑数 UVA 136
    UVA 1368 DNA
    antd 上传文件控件使用方法(坑)
    mysql查询一条工单时间需要10秒。优化sql语句得以解决。
  • 原文地址:https://www.cnblogs.com/pengyingh/p/4923349.html
Copyright © 2011-2022 走看看