Скачал я qt и Qt,и решил поизучать,посмотреть.
Так как c++ не очень хорошо знаю а опыта не очень,то прошу о помощи.
При создании проекта я обратил внимание на это в основных сообщениях:
Выполняется поиск устройств WinRT.
C:/Qt/Qt5.11.0/5.11.0/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-
devices
Обнаружено 1 устройство WinRT.
Project ERROR: Cannot run compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?
Ошибка разбора файла C:UserstimaxDocumentsTest1Test1.pro. Отмена.
И проект не запускается.
Покопавшись я обнаружил,
что есть
Desktop Qt 1.11.0 MSVC2015 32bit
и
Desktop Qt 1.11.0 MSVC2015 64bit
и пишет «Ошибка: у комплекта не задан компилятор»
Как это исправить?
This topic has been deleted. Only users with topic management privileges can see it.
Hello
I am new to QT and i am following the «Raspberry Pi Beginners Guide» on your website because i want to cross compile for a raspberry pi 3.
Everything works fine untill «Compiling Qtbase» . Here i get this error
Project ERROR: Cannot run target compiler ‘/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++’. Output:
sh: 1: /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: not found
Maybe you forgot to setup the environment?
But when i check the path, the file «arm-linux-gnueabihf-g++» is there.
I don’t know what i have to do in the enviroment ????
Thanks in advance
Hi,
You should show the configure options you used to cross-compile Qt.
Hello
This is the command i use (copied from the website http://wiki.qt.io/Raspberry_Pi_Beginners_Guide)
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
I followed the instruction on this website and everything works fine until here
@Softtoon said in Maybe you forgot to setup the environment?:
/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
What do you get if you run that line in your terminal ?
Hello
When ik run the ./configure command i get
- cd qtbase
- /home/tonnie/opt/qt5/qtbase/configure -top-level -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
<srcbase> = /home/tonnie/opt/qt5/qtbase
<bldbase> = /home/tonnie/opt/qt5/qtbase
<outbase> = /home/tonnie/opt/qt5/qtbase
Creating qmake…
.Done.
Info: creating super cache file /home/tonnie/opt/qt5/.qmake.super
Project ERROR: Cannot run target compiler ‘/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++’. Output:
===================
sh: 1: /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: not found
===================
Maybe you forgot to setup the environment?
It complains that it cant find the compiler but the compiler is the correct location
~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin
Do i have to add a path somewhere ? I am not familiar with linux
What do you get if you call /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc --version
?
Hello
Sorry for the misunderstanding.
After running the command that you suggested i had to install gcc-arm-linux-gnueabihf
I did this by entering
sudo apt install gcc-arm-linux-gnueabihf
Now when i run
~/opt/qt5/qtbase$ ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -make tools -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
I get this error :
ERROR: You cannot configure qtbase separately within a top-level build.
What does this mean ?
Are you building from a clear source ?
You should rather do out of source builds, it makes things easier when you have to restart.
try the command below before runnig the ./configure :
sudo apt-get install lib32stdc++6
Had the same issue but it was showing no message between these two lines:
===================
===================
I was using 32 bit compiler for -device-option CROSS_COMPILE I changed it to x64 and problem solved. it is now compiling.
Перейти к контенту
Скачал я qt и Qt,и решил поизучать,посмотреть.
Так как c++ не очень хорошо знаю а опыта не очень,то прошу о помощи.
При создании проекта я обратил внимание на это в основных сообщениях:
Выполняется поиск устройств WinRT.
C:/Qt/Qt5.11.0/5.11.0/winrt_armv7_msvc2015/bin/winrtrunner.exe --list-
devices
Обнаружено 1 устройство WinRT.
Project ERROR: Cannot run compiler 'cl'. Output:
===================
===================
Maybe you forgot to setup the environment?
Ошибка разбора файла C:UserstimaxDocumentsTest1Test1.pro. Отмена.
И проект не запускается.
Покопавшись я обнаружил,
что есть
Desktop Qt 1.11.0 MSVC2015 32bit
и
Desktop Qt 1.11.0 MSVC2015 64bit
и пишет «Ошибка: у комплекта не задан компилятор»
Как это исправить?
I started a Qt Creator project on a Debian Jessie system. I have added the project to git. On a different Debian Jessie system, I imported the project on Qt Creator via git cloning. Qt Creator reports
Could not find qmake configuration default
Error while parsing file <projectpath>.pro. Giving up.
As far as I know, I have installed all of the correct packages. Under the Build & Run options, it has the Desktop kit. It is auto-detecting Qt 4 and Qt 5 (both were installed on the original system), and it is auto-detecting gcc and gdb.
The qmake.conf on both systems for linux-g++ and linux-g++-32 are identical. The files they include are present on both systems.
This seems to be an ongoing problem with Qt. I found Stack Overflow questions on it dating back 2013. Most of those seem to have been related to building Qt from source, though, so they weren’t really helpful.
Any suggestions are appreciated.
UPDATE: If I run Qt Creator as root, I can create and open existing projects. Apparently, this is a permissions issue, but I have no idea where to begin looking.
88 / 83 / 21 Регистрация: 08.08.2012 Сообщений: 737 |
|
1 |
|
25.06.2015, 21:10. Показов 4071. Ответов 2
Здравствуйте! 0 |
127 / 105 / 27 Регистрация: 25.02.2010 Сообщений: 451 |
|
25.06.2015, 21:39 |
2 |
Хулиган, бывает такое. В причинах появления еще не разобрался, но достаточно внести изменения в про-файл и сохранить. 4 |
88 / 83 / 21 Регистрация: 08.08.2012 Сообщений: 737 |
|
25.06.2015, 21:46 [ТС] |
3 |
Воротислав, спасибо, как нибудь попробую 0 |
Qt, Android
Здравствуйте.
Докачал в SDK несколько обновлений.
В QT открываю проект для андроида или создаю новый проект для андроита, отображается только .pro файл, тогда как в папке остальные файлы есть.
Выдает ошибку:
‘Ёб⥬Ґ Ґ г¤ Ґвбп ©вЁ гЄ § л© Їгвм.
‘Ёб⥬Ґ Ґ г¤ Ґвбп ©вЁ гЄ § л© Їгвм.
2018-12-24T16:03:20 Модель кода Clang: Ошибка: Не удалось запустить программу clangbackend «D:QTToolsQtCreatorbinclangbackend.exe» (истекло время: 10000 мс).
clang++.exe: error: unknown argument: ‘-mthumb-interwork’
Project ERROR: failed to parse default search paths from compiler output
Ошибка разбора файла D:QTProjectAndroidTestAndroidTest.pro. Отмена.
clang++.exe: error: unknown argument: ‘-mthumb-interwork’
Project ERROR: failed to parse default search paths from compiler output
Ошибка разбора файла D:QTProjectAndroidTest2AndroidTest2.pro. Отмена.
Скажите пожалуйста, как исправить?
Вам это нравится? Поделитесь в социальных сетях!
Я создал очень простой проект в QT creator, файл * .pro выглядит следующим образом:
HEADERS += inc1.h
SOURCES += src1.cpp
Вот исходный код:
// 1.h
const int C = 1;
// 1.cpp
#include "1.h"
int main() {
return C;
}
QT Creator успешно открывает этот «проект», но не может его проанализировать. F2 не работает для константы C, заголовок 1.h не может быть найден.
Пожалуйста, посмотрите на скриншот, который описывает проблему:
Самым странным является то, что точно такая же вещь работает на моей другой машине с аналогичной установкой QT SDK 5.0! Подскажите, пожалуйста, где я не прав?
4
Решение
HEADERS
должен перечислять заголовочные файлы вашего собственного проекта, так же, как SOURCES
перечисляет исходные файлы.
Если вы хотите включить внешние заголовочные файлы, вы должны добавить их папки в INCLUDEPATH
вместо:
INCLUDEPATH += inc
Следующий файл .pro прекрасно работает в Qt Creator 2.5.0, Qt 4.6.1:
QT += core
QT -= gui
TARGET = test
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES +=
src/1.cpp
INCLUDEPATH += inc
Попробуйте этот точный файл .pro, дайте ему 3 секунды, чтобы проанализировать и сказать мне, работает ли он.
9
Другие решения
Других решений пока нет …
Здравствуйте. Пришел сюда просить о помощи, может кто поможет…
Изучаю С++ в Школе Компьютерной Грамотности, там мы работаем на QtCreator. Вот я и подумал, что неплохо было бы установить. Сие действие я выполнил, только вот при создании проекта пишет следующее:
Maybe you forgot to setup the environment?
Ошибка разбора файла F:Memoires de programmeetesttest.pro. Отмена.
До этого была похожая проблема, как выяснилось я забыл указать в настройках компилятор, но в этот раз то-что?
Так-то английский я знаю. Ясно, что программа оповещает меня о том, что «возможно я забыл установить среду».
Что же мне делать?
Подскажите! Чувствую, что это ни одна ошибка, которую придётся исправить…
В итоге, так или иначе, эта ошибка остаётся. Но проект запустить я всё же могу. Что в принципе логично, ведь речь идёт о .pro — файле.
Вот стартовый код, но я думаю он ни на что не влияет:
C++ | ||
|
I’m happy to help any way I can.
That’s great, thanks.
I think maybe you should try running vcvars and qmake in the same step.
I do, otherwise it would not work at all as a separate step means separate environment,
except if I would export the variables of interest through workflow command messages.
You can see the the workflow file in the run, can’t you?
Also it is not failing in the qmake
step now, but in the nmake
step.
There is some kind of an issue with an invalid .rc file being generated it seems, so i might try that.
What it complains about, the svn-all-fast-export_resource.rc(4) : error RC2104 : undefined keyword or key name: a6144278283d9a9906aa7c085409679be8ed15f6
is the Git commit SHA that is used as version. It is given as -DVER=""a6144278283d9a9906aa7c085409679be8ed15f6""
to rc
and is defined in src.pro
as
if(!defined(VERSION, var)) {
VERSION = $$system(git --no-pager show --pretty=oneline --no-notes | head -1 | cut -b-40)
}
VERSTR = '\"$${VERSION}\"' # place quotes around the version string
DEFINES += VER="$${VERSTR}" # create a VER macro containing the version string