V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
bullettrain1433
V2EX  ›  cocos2d

问个 cocos2d 问题

  •  
  •   bullettrain1433 · Mar 9, 2015 · 9079 views
    This topic created in 4068 days ago, the information mentioned may be changed or developed.
    我最近才把cocos2d在mac上部署上,使用命令cocos new -p com.example -l cpp -d /Users/xxx/cocos demo生成了程序


    然后用xcode运行项目都正常,这时候我准备写代码,新建了头文件xx.h,#include "cocos2d.h"时候点command+鼠标左键出现 symbol not found


    可是已存在的HelloWorldScene.h文件中我点里面的#include "cocos2d.h"就直接跳转到cocos2d源码中了


    我清除了项目derived data再重启xcode问题依旧,求各位v友帮忙下我刚进cocos2d的菜鸟,先谢了
    3 replies    2015-03-10 11:48:52 +08:00
    Virtao
        1
    Virtao  
       Mar 9, 2015   ❤️ 1
    头文件创建在了哪里,是Classes目录下吗?另外,Classes目录下的文件夹都必须是group形式的,不要使用reference。
    sfz97308
        2
    sfz97308  
       Mar 10, 2015   ❤️ 1
    新建头文件时,对话框最下方会询问你要添加到哪一个 Target,应该是你没有选中对应的 Target(需要把 iOS 和 Mac 两个 Target 都要勾上),所以这个头文件没有参与编译。在工程属性里把相关的文件添加上就好了
    bullettrain1433
        3
    bullettrain1433  
    OP
       Mar 10, 2015
    @Virtao
    @sfz97308 感谢,已经解决
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 15:28 · PVG 23:28 · LAX 08:28 · JFK 11:28
    ♥ Do have faith in what you're doing.