NDK SDK Build ERROR

Options
thanhnguyentien
edited March 2015 in Native
Hi, I'm using Photon Realtime for my game on cocos2d-x.
It works perfect on iOS, but I'm getting trouble building native for android.

Here is the error.
In file included from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Peer.h:19:0,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/MutableRoom.h:9,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Client.h:10,
from jni/../../Classes/SplashScene/SplashScene.h:13,
from jni/hellocpp/main.cpp:408:
/Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Enums/LobbyType.h:19:23: error: expected unqualified-id before string constant
In file included from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Peer.h:22:0,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/MutableRoom.h:9,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Client.h:10,
from jni/../../Classes/SplashScene/SplashScene.h:13,
from jni/hellocpp/main.cpp:408:
/Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/LobbyStats.h:21:84: error: expected unqualified-id before string constant
In file included from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Peer.h:19:0,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/MutableRoom.h:9,
from /Users/nguyentienthanh/Documents/gachitora_client/samples/Cpp/Gachitora2/proj.android/jni/Photon/LoadBalancing-cpp/inc/Client.h:10,
from jni/../../Classes/SplashScene/SplashScene.h:13,
from jni/hellocpp/main.cpp:408:
.........

I'm Using Android NDK SDK for cocos2d-x v4.0.0.7.

And as the error says, I've opened LobbyType.h, the error raised on "static const nByte DEFAULT = 1;" but I don't know what is wrong here.
#pragma once

#include "Common-cpp/inc/Common.h"

namespace ExitGames
{
namespace LoadBalancing
{
/** Options of lobby types available. Lobby types might be implemented in certain Photon versions and won't be available on older servers.*/
namespace LobbyType
{

static const nByte DEFAULT = 1; ///<This lobby is used unless another is defined by game or JoinRandom. Room-lists will be sent and JoinRandomRoom can filter by matching properties.
static const nByte SQL_LOBBY = 2; ///<This lobby type lists rooms like Default but JoinRandom has a parameter for SQL-like "where" clauses for filtering. This allows bigger, less, or and and combinations.
}
/** @file */
}
}

Comments

  • Ok, Sorry, I solved the problem.

    The capitalised "DEFAULT" keyword is good for iOS but not good for NDK build for it is the same as "default".
    So I change it to DEFAULT_LOBBY and it works.