[Cocos2dx] - Cpp not compiling in Android using EClipse on Ubuntu

Cocos2d-x v3
  • igorppbr
    Likes 0

    Problem Description

    Hello,

    im trying to work with cocos2dx on Ubuntu 15.04 developing a game for Android.

    Im using Eclipse with ADT Plugin and I add new codes in HelloWord.cpp but when I run the project the changes didn’t effect.

    Sometimes the message “build dynamic library for project cocos2d fails” display in eclipse console.

    What I have to do? I searched in the internet but i can’t find any answer for this.

    Thanks!

  • Sonar Systems admin
    Likes 0

    Does a fresh project build and work?

  • igorppbr
    Likes 0

    Yes, I created a new project and runned in my Android device correctly.

    But I trying to edit HelloWord.cpp and the changes that I do didn’t has effect when I run the App.

    In Eclipse the cpp codes are compiled with the android code when I run the app or I have to compile the cpp codes with another way?

  • Sonar Systems admin
    Likes 0

    Compile them inside the terminal

  • igorppbr
    Likes 0

    How I Can compile in the terminal?

    Every change that I do I have to compile in the terminal before to run in Android?

  • Sonar Systems admin
    Likes 0

    What version of cocos are you using?

  • igorppbr
    Likes 0

    I’m using cocos 3.6.

    I put in the terminal “cocos compile -p android” and I received the error “Ndk build failed”

    I tried change the android ndk version to r9 because I’m using r10e but the error appear again.

  • Sonar Systems admin
    Likes 0

    which r9 version did you try?

  • igorppbr
    Likes 0

    I used r9 x86 version. My Ubuntu is 64bit. I have to use 64bit version of android ndk?

  • igorppbr
    Likes 0

    I tried with 64bit but I had the same error

     


  • igorppbr
    Likes 0

    I found a solution.

    Apparently was a problem with project. I created a new project and works.

    One more ask, that every change I do in cpp files I have to compile in terminal? Have a way to edit in Eclipse and Eclipse compile the project?

  • Sonar Systems admin
    Likes 0

    Compile in terminal

  • igorppbr
    Likes 1

    Thanks!


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Your welcome :D

Login to reply