Thursday, January 17, 2013

Error "Program bash not found in PATH" when building cocos2dx with eclipse cdt build command

Setting up Cocos2dx Android project is tricky. Though this article is very good as a guidance, I still got some problems. One is
When setting the command build in eclipse CDT with the command
bash ${ProjDirPath}/build_native.sh NDK_DEBUG=1 V=1
it complained
"Program "[path]/bash" not found in PATH".
However, we need to use build_native.sh to build the project because Cocos2dx team has done it well and it also configured paths for cocos2dx project(though you can do your own as long as you want to challenge yourself on this). So we need to find a way to run the build_native.sh.

After blood sweat and tears, I found out that this was because I used the NDK plugin to convert the project into C++ project and NDK plugin set builder Android Builder as below

Then the eclipse will be using Android NDK settings to build to project and could not recognise the bash command.

If you use "add native support" to convert the project to C++ project by Android tools and met the same problem. Switch the current builder to GNU Maker Builder, problem fixed!

Make sure you go back c/c++ Build option to reset the build command line to 
bash ${ProjDirPath}/build_native.sh NDK_DEBUG=1 V=1
as switching current builder will reset build command to default one!

33 comments:

  1. Dear Kejun,

    I am new to cocos2d-x. I configure cocos2d-x in Windows 8 / Eclipse.
    First of all this post has been greatly helpful. Thank you.
    Just like you, I also had this problem "Program bash not found in PATH", but now the problem is fixed!
    But now I'm with another problem that appeared after the problem of "bash" is resolved. I created a project that is running, but when I run project that gives an error:
    " [2013-04-30 09:41:20 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, The system cannot find the file specified "
    I've googled plenty on the internet for the solution of the problem, but for now I still can not solve it. I have already add a variable in "Build Variables" with name of "PATH" the type of "Directory" and which value is "C:\cygwin\bin".
    I'm following instructions as this site/course: http://www.lynda.com/Android-tutorials/Building-Monetizing-Game-Apps-Android/107169-2/transcript, but this course does not cover all the topics or problems that may appear.
    Do you have any ideas about what I'm missing or doing wrong?
    Excuse my english, I speak portuguese.
    Appreciate any help, thanks.

    ReplyDelete
  2. Dear Kejun i am currently facing the same problem as you mentioned above..If you solved it uptil now.Please guide me.Thanks in advance :)

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. I really like the dear information you offer in your articles. I’m able to bookmark your site and show the kids check out up here generally. Im fairly positive theyre likely to be informed a great deal of new stuff here than anyone
    Python training in marathahalli | Python training institute in pune

    ReplyDelete
  5. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

    blueprism training in chennai | blueprism training in bangalore | blueprism training in pune | blueprism online training

    ReplyDelete
  6. Good Post, I am a big believer in posting comments on sites to let the blog writers know that they ve added something advantageous to the world wide web.
    Java training in Indira nagar | Java training in Rajaji nagar

    Java training in Marathahalli | Java training in Btm layout

    ReplyDelete
  7. This is such a good post. One of the best posts that I\'ve read in my whole life. I am so happy that you chose this day to give me this. Please, continue to give me such valuable posts. Cheers!

    Data Science training in Chennai | Data science training in bangalore

    Data science training in pune | Data science online training

    Data Science Interview questions and answers

    ReplyDelete
  8. Thank you for this post. Thats all I are able to say. You most absolutely have built this blog website into something speciel. You clearly know what you are working on, youve insured so many corners.thanks

    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  9. Great information, Thanks for this fantastic post.

    ExcelR Data Science in Bangalore

    ReplyDelete
  10. Thank you for your post, I look for such article along time, today i find it finally. this post give me lots of advise it is very useful for me.
    data science courses training

    ReplyDelete
  11. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! data science course in dubai

    ReplyDelete
  12. Really appreciate this wonderful post that you have provided for us.Great site and a great topic as well i really get amazed to read this. Its really good.
    top 7 best washing machine

    ReplyDelete
  13. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this..
    www.technewworld.in
    How to Start A blog 2019
    Eid AL ADHA

    ReplyDelete
  14. The blog and data is excellent and informative as well! Data Science courses

    ReplyDelete
  15. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    pmp certification malaysia

    ReplyDelete
  16. Hey, would you mind if I share your blog with my twitter group? There’s a lot of folks that I think would enjoy your content. Please let me know. Thank you.
    Java Training in Chennai | J2EE Training in Chennai | Advanced Java Training in Chennai | Core Java Training in Chennai | Java Training institute in Chennai

    ReplyDelete

  17. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article. This article inspired me to read more. keep it up.
    Correlation vs Covariance

    ReplyDelete
  18. I read this post two times, I like it so much, please try to keep posting & Let me introduce other material that may be good for our community.

    ReplyDelete
  19. Thanks for sharing an informative blog keep rocking bring more details.I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
    sap training in chennai

    sap training in tambaram

    azure training in chennai

    azure training in tambaram

    cyber security course in chennai

    cyber security course in tambaram

    ethical hacking course in chennai

    ethical hacking course in tambaram

    ReplyDelete
  20. Impressive blog to be honest definitely this post will inspire many more upcoming aspirants. Eventually, this makes the participants to experience and innovate themselves through knowledge wise by visiting this kind of a blog. Once again excellent job keep inspiring with your cool stuff.

    Data Science Course in Raipur

    ReplyDelete
  21. Outstanding blog appreciating your endless efforts in coming up with an extraordinary content. Which perhaps motivates the readers to feel excited in grasping the subject easily. This obviously makes every readers to thank the blogger and hope the similar creative content in future too.

    Data Analytics Course in bhilai

    ReplyDelete
  22. This post is very simple to read and appreciate without leaving any details out. Great work!
    data scientist course

    ReplyDelete
  23. This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. <a href="https://360digitmg.com/india/business-analytics-training-in-kanpur>business analytics course in kanpur</a>

    ReplyDelete
  24. Great survey. I'm sure you're getting a great response. data scientist course in kanpur

    ReplyDelete
  25. You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! business analytics course in surat

    ReplyDelete
  26. I think about it is most required for making more on this get engaged business analytics course in surat

    ReplyDelete
  27. Amazing knowledge and I like to share this kind of information with my friends and hope they like it they why I do
    cyber security training malaysia

    ReplyDelete
  28. Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine.
    full stack development course

    ReplyDelete
  29. It is perfect chance to make a couple of game plans for the future and the opportunity has arrived to be sprightly. I've scrutinized this post and if I may I have the option to need to suggest you some interesting things or recommendations. Perhaps you could create next articles insinuating this article. I have to examine more things about it!

    ReplyDelete
  30. 360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

    ReplyDelete