Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7691877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:43:25+00:00 2026-05-31T20:43:25+00:00

Here is what I did: In Xcode 4.3.1 File -> New -> Project ->

  • 0

Here is what I did:

In Xcode 4.3.1

File -> New -> Project -> Single view application

Dragged the file cocos2d-ios.xcodeproj into navigator.

In build phases settings : Added : libcocos2d.a (becomes highlighted in red), as a linked library (required).

Added OpenGles.framework, Quartzcore, and libz.dylib

Changed build settings – Set “Always Search User Paths” to YES
Added cocos2d source directory to “User Header Search Paths”

Now, it seems I can type: import “cocos2d.h” , in the app delegate and root view controller that Xcode created. But if I create a new file, and I add the line “import “cocos2d.h”” to the top, Xcode complains that the file is not found. But it seems to build fine. Also, in this new file code sense does not work.

What should I do? Why can I import only in the files that Xcode created? Is there some setting I need to change so that in the files I create, I can import cocos2d ?

EDIT: It seems to build and run fine. I can call methods in the cocos2d api. code sense just doesn’t seem to see cocos2d.h in the new files I create.

EDIT – it seems that code sense suggests cocos2d.h when i type : import ”
But it does not suggest classes / methods from the cocos2d api.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:43:27+00:00Added an answer on May 31, 2026 at 8:43 pm

    Turns out I had only added the “user header search paths” to my target, but not in the project settings.

    Adding it fixed the problem. I guess the reason it compiled fine was because I had added it to the target, but it didn’t work in the text editor since I hadn’t added it to the project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a single view project in xcode 4. I added a navigation bar
I downloaded Andy Potion's PFLetsMove framework here and added the Xcode Project to my
My project had no errors until I did a build. Here's the error log.
I'm trying to produce gcd a files from an iOS Xcode 4.2 (4D199) project
I am new to git and to Xcode, and mac in general, so here's
I'm trying to convert an Xcode 3(iOS 4.3) project to ARC in Xcode 4.2
Here's what I did, I have installed svnserve as a service and I started
Here's what I did: Right-clicked on an item in the 'Objects and Timeline' panel.
Did some searches here & on the 'net and haven't found a good answer
I did it using the commands as described here and it works but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.