Eclipse “crossGCC”

我的未来我决定 提交于 2020-01-13 18:02:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!