Domanda

When I try to build my Qt project in QtCreator I get this error:

:-1: error: arm-none-linux-gnueabi-g++: Command not found

Can't figure out why I get this because it's in my PATH and I also use it as compiler in my project settings.

È stato utile?

Soluzione 2

I use CodeSourcery Toolchain and when I installed it, it added this line to my .bash_profile: PATH="/home/dmitry/CodeSourcery/Sourcery_G++_Lite/bin:${PATH}".

But in QtCreator's PATH variable there was a little bit different value: /home/dmitry/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi. In this directory there are files with short names like g++ etc. So I just added the path from .bash_profile and now I am able to build the project.

Altri suggerimenti

This happened to me because I was using the 32 bit Code Sourcery compiler without the corresponding 32 bit linker on my 64 bit Debian Wheezy. The issue was fixed by simple installing the 32 bit toolchain, including the ld linker. Without that, the command does not quite appear as an executable.

You are trying to cross-compile on a 64 bit machine for 32 bit, so you need to have the 32 bit toolchain files available in the proper path, too.

Why it works without QtCreator, that is mysterious, but probably because you already have it installed, but the path and/or the mkspec specific in QtCreator is not right for 32 bit.

Using this long thing, arm-none-linux-gnueabi-g++, is improbable although not impossible.

I suggest to create a wrapper for this name to your original compiler (probably like arm-...-gcc or simply gcc).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top