How to determine C code is compiled for Android/NDK or iOS

后端 未结 2 1391
鱼传尺愫
鱼传尺愫 2021-02-20 13:22

I am reusing a legacy C library in an iOS app and in an Android app. I want to customize some macro definitions (e.g. for logging). Are there standard defines to check for (usin

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-20 14:13

    you should consider creating two separate projects for those platforms with separate output/bin directories but shared source code. Then you just set some define in project properties for android and ios so you can recognize it when compiling

提交回复
热议问题