Start a console window and run following command
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
When the homebrew installation is finished, run the following command
//clang++ -std=c++11 -stdlib=libc++ -framework Foundation nsarray.mm -o nsarray | |
/* Note: | |
* - libstdc++ has been frozen by Apple at a pre-C++11 version, so you must opt | |
for the newer, BSD-licensed libc++ | |
* - Apple clang 4.0 (based on LLVM 3.1svn) does not default to C++11 yet, so | |
you must explicitly specify this language standard. */ | |
/* @file nsarray.mm | |
* @author Jeremy W. Sherman | |
* | |
* Demonstrates three different approaches to converting a std::vector |
01-20 15:17:09.189: E/AndroidRuntime(5322): FATAL EXCEPTION: GLThread 6519 | |
01-20 15:17:09.189: E/AndroidRuntime(5322): Process: org.cocos2dx.HelloPlugins, PID: 5322 | |
01-20 15:17:09.189: E/AndroidRuntime(5322): java.lang.NoClassDefFoundError: com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$a | |
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider.<init>(vungle:18) | |
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$$InjectAdapter.get(vungle:56) | |
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.location.GooglePlayServicesDetailedLocationProvider$$InjectAdapter.get(vungle:23) | |
01-20 15:17:09.189: E/AndroidRuntime(5322): at dagger.internal.Linker$SingletonBinding.get(Linker.java:364) | |
01-20 15:17:09.189: E/AndroidRuntime(5322): at com.vungle.publisher.inject.ConfigurablePublisherModule$$ModuleAdapter$ProvideDetailedLocationProviderProvides |
#include "HelloWorldScene.h" | |
#include "cocostudio/CocoStudio.h" | |
#include "ui/CocosGUI.h" | |
USING_NS_CC; | |
using namespace cocostudio::timeline; | |
Scene* HelloWorld::createScene() | |
{ |
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d) | |
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/external) | |
$(call import-add-path,$(LOCAL_PATH)/../../cocos2d/cocos) | |
LOCAL_MODULE := cocos2dcpp_shared |
#include "MyWidget.h" | |
#include "ui/UIText.h" | |
USING_NS_CC; | |
using namespace std; | |
using namespace cocos2d::ui; | |
MyWidget::MyWidget(){} | |
Widget::ccWidgetTouchCallback MyWidget::onLocateTouchCallback(const string &callBackName) | |
{ |
Package Manager provides a way for developers to easily extend cocos2d-x with plugins
Core Features:
#include "PluginProtocol.h" | |
#include <map> | |
#include <list> | |
#include <string> | |
using namespace std; | |
typedef enum | |
{ |
#traverse all the directory and subdirectory | |
define walk | |
$(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e))) | |
endef | |
#find all the file recursively under jni/ | |
ALLFILES = $(call walk, $(LOCAL_PATH)) | |
FILE_LIST := $(filter %.cpp, $(ALLFILES)) | |
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) |
/** @file PluginProtocol.h | |
*/ | |
#ifndef __CCX_IPLUGIN_H__ | |
#define __CCX_IPLUGIN_H__ | |
#include "PluginParam.h" | |
#include <vector> | |
namespace anysdk { namespace framework { |