Configure the cross gcc path and prefix что это eclipse

Обновлено: 02.07.2024

Я пытаюсь создать проект С++ на eclipse. Я установил для него eclipse-cdt.

При создании проекта всплывающее окно запрашивает префикс перекрестного компилятора и путь перекрестного компилятора. Может кто-нибудь объяснить, что это такое и что мне нужно добавить в эти поля? Необходимы ли эти поля для заполнения?

В префиксе кросс-компилятора вам нужно написать "arm-none-eabi-", а в кросс-компиляторе вы должны выбрать путь для папки GCC bin. Для этого вам необходимо установить Cygwin GCC. Я нашел несколько шагов ниже ссылки.

На всякий случай, если кто-то другой подобен мне и нуждается в более ясных указаниях, поскольку @yeremy верен, так как вам нужно выбрать MacOSX GCC. Это просто, что в точке, где находится OP, он промахнулся, где мог бы сделать выбор, и ему нужно создать резервную копию нескольких окон (около 3), чтобы выбрать MacOSX GCC в качестве инструментальной цепочки выбора. Присоединение ссылки ниже, которая проходит через этапы, а также показывает изображение окна, в котором вы можете сделать выбор (рисунок 11).

"Может кто-нибудь объяснить, что это такое. ". Акцент на ЧТО добавил. Не КАК, ПОЧЕМУ и т.д.

J ust ЧТО ТАКОЕ цель "префикса кросс-компилятора" и его "путь".

Когда Eclipse не обнаруживает цепочку инструментов (устанавливается отдельно), она предлагает только опцию "Cross GCC". Не выбирай это.

Сайты типа этого сообщают вам, что правильно установленный набор инструментов (Cygwin/MinGW) автоматически обнаруживается с помощью переменной среды PATH . Это не так на моей машине.

Нет никакого способа настроить набор инструментов в Eclipse вручную (на момент написания), но вы можете обмануть Eclipse, чтобы найти его, не изменяя свой глобальный PATH :

Перейти к Preferences / C/C++ / Build / Environment ,

Добавьте переменную PATH и укажите ее на пути (ях) цепочки инструментов, например, d:\Mingw\bin;d:\Mingw\msys\1.0\bin . Разделяйте пути точкой с запятой.

Cross compiler prefix and path in eclipse

I'm trying to create a C++ project on eclipse. I have installed eclipse-cdt for that.

While creating a project, a pop up window asks for cross compiler prefix and cross compiler path. Could someone please explain what are those and what do I need to add in those fields? Are those fields absolutely necessary to fill?

8,946 36 36 gold badges 82 82 silver badges 102 102 bronze badges 6,410 17 17 gold badges 61 61 silver badges 115 115 bronze badges

Cross compiler prefix and path in eclipse

I'm trying to create a C++ project on eclipse. I have installed eclipse-cdt for that.

While creating a project, a pop up window asks for cross compiler prefix and cross compiler path. Could someone please explain what are those and what do I need to add in those fields? Are those fields absolutely necessary to fill?

8,946 36 36 gold badges 82 82 silver badges 102 102 bronze badges 6,410 17 17 gold badges 61 61 silver badges 115 115 bronze badges

5 Answers 5

Voted down because the link you gave no longer works.

In Cross compiler Prefix you need to write 'arm-none-eabi-' and in Cross compiler path you have to select the path for GCC bin folder. You need to install Cygwin GCC for this. I have found few steps in below link.

Just in case anybody else is like me and needs more explicit directions as @yeremy is correct in that you have to select MacOSX GCC. It's just that at the point where the OP is, he overshot where he could have made the selection and needs to back up a few windows (about 3) to choose the MacOSX GCC as the Toolchain of choice. Attaching a link below which goes through the steps and which also shows image of window where you can make the selection (figure 11).


When Eclipse doesn't detect a toolchain (to be installed separately) it only offers the option "Cross GCC". Don't choose that.

Sites like this tell you that a properly installed toolchain (Cygwin / MinGW) is automatically discovered using the PATH environment variable. This is not the case on my machine.

There's no way to configure a toolchain in Eclipse manually (as of writing) but you can fool Eclipse into finding one without changing your global PATH :

Почему Eclipse игнорирует мой префикс для инструментов Cross GCC?

Я пытаюсь создать образец проекта с использованием инструментальной привязки ARM Embedded GCC; Для этого я использую внутренний строитель Eclipse.

В настройках "Свойства проекта" → C/C++ "Сборка" → "Настройки" → "Настройки инструмента" → "Перекрестные настройки", "Префикс" установлен на "нет" и "Путь" установлен на путь инструментальной привязки ARM (C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\bin).

Когда я пытаюсь построить проект, я получаю что-то похожее на это:

. и затем ошибка о том, как gcc не найден на моем пути. Который, конечно, это не так. Однако на моем пути есть arm-none-eabi-gcc.exe, но по какой-то причине Eclipse не склонен запускать этот.

Я обнаружил, что если я изменил "Command" для "Cross GCC Compiler" (Свойства проекта → C/C++ Build → Settings → Tool Settings → Cross GCC Compiler → Command) на "gc" (из "gcc"), то Eclipse пытается запустить "arm-none-eabi-gc" вместо "gc". Я чувствую, что это важный ключ, но я этого не понимаю.

5 Answers 5

Voted down because the link you gave no longer works.

In Cross compiler Prefix you need to write 'arm-none-eabi-' and in Cross compiler path you have to select the path for GCC bin folder. You need to install Cygwin GCC for this. I have found few steps in below link.

Just in case anybody else is like me and needs more explicit directions as @yeremy is correct in that you have to select MacOSX GCC. It's just that at the point where the OP is, he overshot where he could have made the selection and needs to back up a few windows (about 3) to choose the MacOSX GCC as the Toolchain of choice. Attaching a link below which goes through the steps and which also shows image of window where you can make the selection (figure 11).


When Eclipse doesn't detect a toolchain (to be installed separately) it only offers the option "Cross GCC". Don't choose that.

Sites like this tell you that a properly installed toolchain (Cygwin / MinGW) is automatically discovered using the PATH environment variable. This is not the case on my machine.

There's no way to configure a toolchain in Eclipse manually (as of writing) but you can fool Eclipse into finding one without changing your global PATH :

Читайте также: