问题
I just downloaded the Eclipse IDE for C/C++ (on Window 7) and trying to create a simple new project. In the tool chains there are "Cross GCC", "Cygwin GCC" and "Microsoft Visual C++".
I never heard of the "Cross GCC" before. What is the different between "Cross GCC" and "CygwinGCC" and the normal "GCC"?
--ABS
回答1:
If you're interested in "normal GCC" at Windows environment, it may be worth to install MinGW (with MSYS) instead of Cygwin. Here is a good discussion on "Cygwin vs MinGW" so you can pick appropriate What is the difference between Cygwin and MinGW?
回答2:
You need to use a cross-compiler unless you are developing on your own operating system. The compiler must know the correct target platform (CPU, operating system), otherwise you will run into trouble. If you use the compiler that comes with your system, then the compiler won't know it is compiling something else entirely.
As for example if you want to compile something like for Raspberry Pi, Beagle-bone, or some arm cortex M4 embedded processor etc. with your windows or mac machine (assuming you are using a Intel processor for PC/mac) your compiler needs to know that you are coding or building something for those processors and your compiler has to have those tool chain definitions in order to compile and in those cases the compiler would cross compile.
来源:https://stackoverflow.com/questions/16020338/eclipse-crossgcc