Assignment needs exactly one word on the left hand side

All the sudden, Qt stops working and it throws the following nonsense message.

/Users/XXXXX/Desktop/.qmake.stash(35): Assignment needs exactly one word on the left hand side.
/Users/XXXXX/Desktop/.qmake.stash(36): Assignment needs exactly one word on the left hand side.
/Users/XXXXX/Desktop/.qmake.stash(37): Assignment needs exactly one word on the left hand side.
Error while parsing file /Users/XXXXX/Desktop/untitled folder/untitled/untitled.pro. Giving up.

The entire day I couldn’t solve the issue. I’ve reinstalled XCode 8 plus the terminal command tools and Qt 5.8 but with no luck. I’ve tried the solutions in this post Error: Could not resolve SDK path for ‘macosx10.8’ but none of the solutions worked. I’m not sure what the hell is wrong with the configuration and whether XCode or Qt causes the issue.

INFO:

macOS Sierra 10.12.4

Based on Qt 5.8.0 (Clang 7.0 (Apple), 64 bit

XCode: Version 8.3.1 (8E1000a)

У меня проблемы с созданием приложения, которое связывается с устройствами FTDI через Драйвер D2xx.На сайте ftdi есть пример проекта для Visual Studio. Но это не для QtCreator. Я выбрал QtCreator в качестве c ++ IDE, потому что моему приложению нужна инфраструктура Qt.
Я поместил ftd2xx.h и ftd2xx.lib в каталог проекта Qt.

(ftd2xx.lib — статическая библиотека, которая изначально находилась в [download-folder] CDM v2.08.30 для Windows 8.1 Static i386)

Когда образец исходного кода был скомпилирован, я получил следующее сообщение об ошибке.

Сообщение об ошибке при использовании файла .pro (1).

LNK1104: cannot open file 'ftd2xx.lib'

Сообщение об ошибке при использовании файла .pro (2).

error: Assignment needs exactly one word on the left hand side.

Как я должен исправить настройки проекта Qt, чтобы использовать библиотеку ftd2xx?

Мой исходный код и .pro файл здесь.

[Main.cpp]

#include <QCoreApplication>
#include <windows.h>
#include "ftd2xx.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
FT_HANDLE ftHandle;
FT_STATUS ftStatus;
ftStatus =  FT_Open(0,&ftHandle);

return a.exec();
}

[.pro файл, если флажок включен] — (1)

#-------------------------------------------------
#
# Project created by QtCreator 2014-02-11T18:51:08
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = D2XXtest
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = appSOURCES += main.cpp
HEADERS += ftd2xx.h

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/ -lftd2xx
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/ -lftd2xxd

INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/

win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/libftd2xx.a
else:win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/libftd2xxd.a
else:win32:!win32-g++:CONFIG(release, debug|release): PRE_TARGETDEPS += $$PWD/ftd2xx.lib
else:win32:!win32-g++:CONFIG(debug, debug|release): PRE_TARGETDEPS += $$PWD/ftd2xxd.lib

[.pro файл, если флажок Не включено] — (2)

#-------------------------------------------------
#
# Project created by QtCreator 2014-02-11T18:51:08
#
#-------------------------------------------------

QT       += core

QT       -= gui

TARGET = D2XXtest
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = appSOURCES += main.cpp
HEADERS += ftd2xx.h

win32: LIBS += -L$$PWD/ -lftd2xx

INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/

win32:!win32-g++ PRE_TARGETDEPS += $$PWD/ftd2xx.lib
else:win32-g++: PRE_TARGETDEPS += $$PWD/libftd2xx.a

Любая помощь будет оценена. Заранее спасибо.

[Заметка]

ОС: Windows 8.1

IDE: Qt Creator 3.0.0

Компилятор: MSVC2012 (32 бита)

Целевое устройство: ft232hl

[Дополнительное примечание]

Конфигурация «Добавить библиотеку» следующая.
Если я включаю флажок «Добавить суффикс d» для отладочной версии, то получаю сообщение об ошибке LNK1104. В противном случае я получаю другое сообщение об ошибке.

введите описание изображения здесь

0

Решение

Я догадываюсь, что вы сделали опечатку в своем сообщении об ошибке, а настоящее сообщение об ошибке выглядит следующим образом:

LNK1104: cannot open file 'ftd2xxd.lib'

Видеть, что d там? Это не принадлежит, нет ftd2xxd.lib, Вы должны изменить любые ссылки на ftd2xxd.lib вернуться к ftd2xx.lib, перезапустите qmake, и у вас все будет готово. В противном случае ваш файл .pro кажется правильным.

После редактирования вы дали файл .pro с включенным флажком. Это, конечно, не так, поскольку содержимое, которое вы показываете, подразумевает, что флажок отключен, не включен.

Во всяком случае, нам все равно, какие настройки диалогового окна. Просто покажи актуальный .pro файл, который вы действительно используете, потому что до сих пор я не знаю, какой вы используете, и я не знаю, перезапускаете ли вы qmake после .pro файл был изменен.

Вы уверены, что ftd2xx.lib Файл на самом деле находится в той же папке, где .pro файл есть?

1

Другие решения

Других решений пока нет …

Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink

Loading

Dronecode

PX4

QGroundControl

QGC

MAVSDK

MAVLink

Documentation

Docs

Support

Help


  • Type:


    Bug

  • Status:

    Closed


  • Priority:


    Not Evaluated

  • Resolution:

    Invalid


  • Affects Version/s:



    Qt Creator 3.0.0-beta

  • Fix Version/s:



    None


  • Environment:

    Debian wheezy 64bit

qtcreator seems to have problems with certain constructs in .pro, .pri, and .prf files. This leads to long lists of error messages when parsing the Qt source tree, e.g. from the qt-everywhere source package for 5.2.0-beta1. The messages look like this:

Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtactiveqt/src/tools/idc/idc.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtactiveqt/tools/dumpcpp/dumpcpp.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtactiveqt/tools/dumpdoc/dumpdoc.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtbase/src/angle/angle.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtbase/src/concurrent/concurrent.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtbase/src/corelib/corelib.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtbase/src/dbus/dbus.pro. Giving up.
Error while parsing file /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtbase/src/gui/gui.pro. Giving up.
[...]
annot read /config.tests/unix/freetype/freetype.pri: No such file or directory
Cannot read /src/platformsupport/linuxaccessibility/linuxaccessibility.pri: No such file or directory
Cannot read /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtconnectivity/staticconfig.pri: No such file or directory
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(150): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(151): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(153): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(154): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(156): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(150): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(151): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Source/WebKit2/DerivedSources.pri(153): Assignment needs exactly one word on the left hand side.
[...]
Cannot read /home/ulf/dev/qttest/build-qt-Desktop_Qt_5_2_0_GCC_64bit-Debug/qtserialport/.qmake.cache: No such file or directory
Cannot read /home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtconnectivity/staticconfig.pri: No such file or directory
/home/ulf/dev/qttest/build-qt-Desktop_Qt_5_2_0_GCC_64bit-Debug/qtquick1/mkspecs/modules/qt_tool_qml1plugindump qmlplugindump.pri(1): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/build-qt-Desktop_Qt_5_2_0_GCC_64bit-Debug/qtquick1/mkspecs/modules/qt_tool_qml1plugindump qmlplugindump.pri(2): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Tools/qmake/mkspecs/features/functions.prf(90): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Tools/qmake/mkspecs/features/functions.prf(93): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Tools/qmake/mkspecs/features/functions.prf(96): Assignment needs exactly one word on the left hand side.
/home/ulf/dev/qttest/qt-everywhere-opensource-src-5.2.0-beta1/qtwebkit/Tools/qmake/mkspecs/features/functions.prf(90): Assignment needs exactly one word on the left hand side.


No reviews matched the request. Check your Options in the drop-down menu of this sections header.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Pick a username
Email Address
Password

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Понравилась статья? Поделить с друзьями:
  • Aspose word for java
  • Aspose pdf convert word to pdf
  • Aspose jpg в word
  • Aspose excel to pdf
  • Aspects of word stress