Macros.h not found in creator c++

Macros.h not found in creator c++
0.0 0

#1

Hi, im using prebuilt for cocos2dx v3.16 and was trying to compiled with creator to c++ plugin. however, Macros.h not found in AnimationClip.h, how to solved it ? thanks.


#2

Sorry you export from Creator to c++ and then you cannot compile because those files are missing?


#3

well, i find it weird too. i just included
#include "reader/CreatorReader.h
build, then Macros.h not found in AnimationClip.h which is actually Macros.h is not missing.
i drag folder creator to my xcode, macros.h dissapear, but
#include "dragonbones/cocos2dx/CCTextureData.h" is not found.
i uploaded to my repo here , thanks @slackmoehrle
update:
this error happened after adding creator reader to search path lib


#4

I think you should include the path of reader.


#5

And you can refer to https://github.com/minggo/cocos2d-x/tree/creator-cpp-support-test-v315 about how to use it.


#6

ah thanks @zhangxm forgot that one :slight_smile:


#7

Facing same issue. I still not found the solution for this even after following https://github.com/minggo/cocos2d-x/tree/creator-cpp-support-test-v315 @zhangxm @adesuluh can you guys please help.


#8

@Honey555 could you please describe what you did step by step? Thanks.


#9

Heyy thanks for your reply :slight_smile:

I found one work-around for my solution, but still i think there can be some better way than this to fix this.

  1. I have created cocos creator project. (and created one simple game.)
  2. Added “creator-luacpp-support” in ‘package/’ directory
  3. Generated cocos2d-x project using that.
  4. Created separate cocos project from command line.
  5. Added generated (at step 3) classes and resources into new project (at step 4)
  6. later added ‘reader/’ in search path for proj.ios_mac

at that time i was getting this issue:

later i have added all the cpp files under the ‘reader’ directory into proj.ios_mac > Build phases > Compile Sources
Like this:

Please let me know if there is any better option is possible for this, Thanks for your time :slight_smile:


#10

@Honey555 the error image seems is nothing about Macros.h. You said you facing the same issue, it confused me.

The error you attached seems you don’t add files into correct target, so you should make sure there cpp files are added into correct target (mac or iOS).