Using eclipse compile errors occur

Do as these page and use cygwin to complie and build ardupilot, errors occured,about “g++ tool not found”
.however,Use cygwin terminal alone to complie and build ardupilot project to solve it?

Did you use the install script at the top of this wiki page? … or did you follow the individual steps listed on the wiki page?

I think maybe the install script is missing the step to install the gcc compiler.

Already done,I think if I did not install script and gcc compiler,build in cygwin terminal would fail.And I configured the system path,but eclipse console show errors.

Would you please post a screenshot of the errors you get in eclipse?

I just deleted my Cygwin environment and reinstalled it to check a different issue with the Eclipse install instructions. The instructions should have the
Build Command: c:\cygwin64\bin\python3.7m waf

The script worked for me except as Randy mentioned our install script doesn’t seem to install the Arm compilers for you. And the wiki is not pointing to the latest compilers.

Link to the latest compiler: here

Be sure to check the “Add to Path” box

Note: The arm compiler is only needed if you are building for hardware.

PS: I forgot to add my obligatory are you sure you want/need to use cygwin instead of WSL?

WSL2 is faster for nearly everything and integrates better into windows. Plus you can use VSCode :wink:

I never used WSL,and I dislike VSCode as it run slowly…WSL2 was the newer WSL version?

Here are the two screenshots,cygwin ok,eclipse failed…

I wonder if your path variable for GCC is set in Eclipse? Clearly it is for cygwin itself though…

Sorry it has been a while since I’ve used eclipse and can’t remember if there where others changes I made from the directions.

I did test uninstalling cygwin and arm-gcc and everything has worked with this script:

I did not try uninstalling Eclipse though…

See below in my eclipse.

In the PATH variable I find C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin;

WSL2 is the newer version and works wonderfully for nearly everything. It has much faster compilation times than cygwin by 10 times on my machine. You do need to use WSL1 for upload custom firmware, usb, access, Real Flight sitl and few other items.

VSCode connecting to WSL2 is blazing fast for me. I’ve never had an issue on that front and I have 3 VSCode windows and many open tabs in each.

Hurrah!I solved it as your instrcution!You’re wonderful,Josh~ :+1: :+1: :+1:.I think I just did some wrong configuration about build path as the picture shown below: added the path variables in the “C/C++ Build”----“build location”:rofl:

and next I will try WSL2,enjoy its efficency


Awesome to hear that it worked for you! :smiley:

Just so that I can update the documentation, you changed C/C++ Build -> Environment -> PATH -> and added C:\Program Files (x86)\GNU Arm Embedded Toolchain\10 2020-q4-major\bin; ?

yeah,and by the way,do not add “waf” in “Build command” shown picture below,and it should be configure in the project build item lonely

You can put “waf” in the build command if you want as long as you dont then also include it in the build target commands. However, I’m sure there are many ways you can setup compilation so whatever works :slight_smile:

1 Like