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}/ NDK_DEBUG=1 V=1
it complained
"Program "[path]/bash" not found in PATH".
However, we need to use 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

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}/ NDK_DEBUG=1 V=1
as switching current builder will reset build command to default one!


  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?] 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:, 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.

  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 :)

  3. When I initially commented, I clicked the “Notify me when new comments are added” checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove people from that service? Thanks.
    Amazon Web Services Training in OMR , Chennai | Best AWS Training in OMR,Chennai
    Amazon Web Services Training in Tambaram, Chennai|Best AWS Training in Tambaram, Chennai

  4. This comment has been removed by the author.

  5. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.

    angularjs Training in online

    angularjs Training in bangalore

    angularjs Training in bangalore

    angularjs Training in btm

  6. Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.

    angularjs Training in chennai
    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

  7. 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

  8. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    advanced excel training in bangalore

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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.
    Microsoft Azure online training
    Selenium online training
    Java online training
    Python online training
    uipath online training

  14. Great information, Thanks for this fantastic post.

    ExcelR Data Science in Bangalore

  15. 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

  16. 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

  17. Actually I read it yesterday but I had some thoughts about it and today I wanted to read it again because it is very well written.

    Big Data Course

  18. Amazing knowledge and I like to share this kind of information with my friends and hope they like it they why I do
    Data Science Course in Pune

  19. 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

  20. Alleyaaircool is the one of the best home appliances repair canter in all over Delhi we deals in repairing window ac, Split ac , fridge , microwave, washing machine, water cooler, RO and more other home appliances in cheap rates

    Window AC Repair in vaishali
    Split AC Repair in indirapuram
    Fridge Repair in kaushambi
    Microwave Repair in patparganj
    Washing Machine Repair in vasundhara
    Water Cooler Repair in indirapuram
    RO Service AMC in vasundhara
    Any Cooling System in vaishali
    Window AC Repair in indirapuram

  21. 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..
    How to Start A blog 2019
    Eid AL ADHA

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

  23. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates.
    Data Science Courses

  24. 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

  25. 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