V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
SunFarrell
V2EX  ›  Android

Android code 在子目录用 cmake 链接上层目录的 cpp 文件

  •  
  •   SunFarrell · 2018-12-18 17:00:16 +08:00 · 3750 次点击
    这是一个创建于 1927 天前的主题,其中的信息可能已经有所发展或是发生改变。
    目录结构
    - Engine cpp file
    - Android project
    - iOS project

    目的
    1. Android Studio 像 xcode 一样用 cmake 引用 Engine cpp 里的 C++ 代码
    2. Android Studio 像 xcode 一样查看并修改 cmake 里引用的 Engine cpp C++ 代码

    现状
    用 cmake 引用外部的 cpp 编译代码,Android Studio 只能查看 C++ 的 cpp 文件,看不了头文件,修改不了 cpp 文件


    除了把 Engine cpp copy 到 Android Studio 里还有别的方法么,能达到我的目的么?

    PS:新手勿喷
    2 条回复    2018-12-18 17:48:49 +08:00
    hw2ex
        1
    hw2ex  
       2018-12-18 17:07:06 +08:00 via Android
    本来就可以呀。
    SunFarrell
        2
    SunFarrell  
    OP
       2018-12-18 17:48:49 +08:00
    @hw2ex 我这边用 cmake 链了后,在 AS 里看不了 C++ 代码的头文件
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1538 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 17:01 · PVG 01:01 · LAX 10:01 · JFK 13:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.