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 7708247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:33:50+00:00 2026-06-01T00:33:50+00:00

Scenario: I have run and compiled an existing c++ code of cocos2d-x on android

  • 0

Scenario:
I have run and compiled an existing c++ code of cocos2d-x on android emulator using eclipse and NDK (CDT and Sequoyah are installed)(c++ code edited outside the eclipse). but, not able to edit c++ code or debug during runtime.

If I open a c++ (main.cpp) file, the project gets contaminated with errors.
main.cpp is a file having java as well as c++ code in it. and already included in my project.
(closing the project and then reopening it solves the errors for the time being)

Problems are:

1) how to open existing c++ files in a working android project?

2) how to tell eclipse that it’s a mixed code/project of c++ as well as java. and not an error

thanks.

  • 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-06-01T00:33:52+00:00Added an answer on June 1, 2026 at 12:33 am

    In order to tell eclipse that it’s a mixed project, while in C++ perspective, go to new->Convert to C/C++ project. It’s a misnomer, it makes it a mixed project.

    In order to let it find the included files, go to project preferences->C++ Generel->Paths and Symbols. There you can add the include folders for C/C++ (separately). The folders you need are

    {Android NDK install dir}/sources/cxx-stl/{the stl that you're using if you're using it}/include

    and

    {Android NDK install dir}/platforms/Android[yourAPIlevel]/arch-arm/usr/include/android.

    BTW. I was following some tutorial for this process, and they’ve also recommended going to C/C++ build, and doing the following:

    • uncheck “Use default build command”
    • change build command to ndk-build (we’ll come back to that)
    • remove “all” from the text field next to “Build(Incremental Build)”
    • uncheck clean

    This way, you can also build from eclipse. And it’s really nice because that way you can also simply press “Run” and it will compile the C++ code, put the .dll (or .so) in the right place, install, and run. One little detail though. I think this is with newer versions of android-ndk that you have to say make APP=yourappname at the android-ndk installation root. So, that ndk-build in eclipse doesn’t work. In order to trigger make in the right place, you can simply use make -C PATHTOYOURNDKINSTALLATION APP=yourappname as the build command in eclipse.

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

Sidebar

Related Questions

My scenario is this: I have a base NHibernate query to run of the
Ok, i have simple scenario: have two pages: login and welcome pages. im using
Scenario: I have a document I created using LaTeX (my resume in this case),
Scenario I have a server, that has NO Visual Studio Installed. It literally has
I have run into a scenario where Entity Framework 4.0 does not generate an
I seem to have hit on a scenario where when I run mstest on
I have run into a very strange scenario. There is a .resx file in
I have run into a common dilemma. Many times, our company relies on using
I have an app that uses some code scripts to generate dll's at run-time
Beginner level question Scenario: Have simple string cocantation tool, that I might expand later

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.