LoginSignup
3
4

More than 5 years have passed since last update.

Cocos2d-xでRx.cppを使う

Last updated at Posted at 2014-10-02

Rx.cppというC++用のリアクティブプログラミングのライブラリがあります。
Cocos2d-xでRx.cppを使おうとすると、iPhone用のビルドで次のようなエラーが出ます。

.../Rx/v2/src/rxcpp/schedulers/rx-currentthread.hpp:35:16: error: thread-local storage is unsupported for the current target
        static RXCPP_THREAD_LOCAL current_thread_queue_type* queue;

...

.../Rx/v2/src/rxcpp/rx-util.hpp:14:28: note: expanded from macro 'RXCPP_THREAD_LOCAL'
#define RXCPP_THREAD_LOCAL __thread

エラーメッセージに書いてあるとおり、iPhoneではthread-localがサポートされていないとのことなので、このままではビルドが通りません。

解決方法

githubのissueが上がっていて、forkしたこちらのブランチには修正がコミットされています。こちらを使いましょう。

ただしベースが少し古いので、本家の最近のコミットは反映されていません。
こちらのブランチに、本家のわりかし最近のコミットをベースにマージしたものをPushしておきました。横着したい方はお使いください。

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4