[SOLVED] [HELP ME] "stack" file not found - if project move/copy to another folder

I use cocos2d-x v3.8 with xcode 7.0
After create a new project “test” in the folder /Documents/cocos2d-x-3.8_project/ with command:

“cocos new test -p com.mycom.test -l cpp -d ~/Documents/cocos2d-x-3.8_project --portrait”

I can build and run successful on iphone

But if either MOVE or COPY the project to another folder (ex: Desktop or any where).
I got the error - “stack” file not found - at the line #include < stack > in CCDirector.h

And althought I COPY or MOVE back to the previous folder when creating (ex…/Documents/cocos2d-x-3.8_project) - I still got the error “stack” file not found ???

I can not do any thing to fix except create the new Project and copy class files to that new one…and CAN NOT COPY or MOVE the project any where else… and CAN NOT FIX IT BY copy back…

Thanks GOD, I just found the solution
Build Setting-> Search Paths->Always Search User Path-> NO

Thank you all the same

Thank you!

Didn’t work for me. I got the same problem after changing spine runtime to the latest one

it does not work for my project.is there any other resolution for this problem?

In my cases this happen when:

  1. You are trying include C++ header in Objective-C implementation file.
  2. You are trying include header twice. That can not clear for you, why compiler not indicate? Because one of this includes header through another header.

Thank you very much.

In my case, I solved this problem by changing the filename extension from .m to .mm.

.mm file contains a line below.


#import “cocos2d.h”