C++ 如何为QNX目标(arm)构建Qt5.1 新更新

C++ 如何为QNX目标(arm)构建Qt5.1 新更新,c++,qt,qt5,qmake,qnx,C++,Qt,Qt5,Qmake,Qnx,我想我现在应该编辑标题了 为了确保我有一个干净的环境,我 从qt项目下载qt5.1.1 src代码 导出QNX_目标、QNX_主机,并将QNX_主机添加到路径中 然后运行脚本 /configure-开源-确认许可证-xplatform qnx-armv7le-qcc-v 所以在这里,-opensource-confirm许可证只是避免Q&A-v显示完整的消息 Creating qmake... make: Nothing to be done for `first'. Running conf

我想我现在应该编辑标题了

为了确保我有一个干净的环境,我

  • 从qt项目下载qt5.1.1 src代码
  • 导出QNX_目标、QNX_主机,并将QNX_主机添加到路径中
  • 然后运行脚本
    /configure-开源-确认许可证-xplatform qnx-armv7le-qcc-v
  • 所以在这里,-opensource-confirm许可证只是避免Q&A-v显示完整的消息

    Creating qmake...
    make: Nothing to be done for `first'.
    Running configuration tests...
    Determining architecture... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -g -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o arch.o arch.cpp
    Unable to determine architecture!
    
    Could not determine the target architecture!
    Turn on verbose messaging (-v) to see the final report.
    Determining architecture... ()
    g++ -c -pipe -g -Wall -W -fPIE  -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
    g++  -o arch arch.o    { test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
    Found architecture in binary
    CFG_HOST_ARCH="x86_64"
    CFG_HOST_CPUFEATURES=" mmx sse sse2"
    System architecture: 'unknown'
    Host architecture: 'x86_64'
    C++11 auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wc,-std=gnu++0x -Wall -W -fPIE-DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o c++11.o c++11.cpp
    C++11 disabled.
    floatmath auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD-I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o floatmath.o floatmath.cpp
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o freetype.o freetype.cpp
    FreeType disabled.
    STL auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o stltest.o stltest.cpp
    STL disabled.
    STL functionality check failed! Cannot build Qt with this STL library.
    Turn on verbose messaging (-v) to /home/pasadeveloper/qt-everywhere-opensourcesrc-5.1.1/qtbase/configure to see the final report.
    
    很多错误信息

    Creating qmake...
    make: Nothing to be done for `first'.
    Running configuration tests...
    Determining architecture... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -g -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o arch.o arch.cpp
    Unable to determine architecture!
    
    Could not determine the target architecture!
    Turn on verbose messaging (-v) to see the final report.
    Determining architecture... ()
    g++ -c -pipe -g -Wall -W -fPIE  -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp
    g++  -o arch arch.o    { test -n "" && DESTDIR="" || DESTDIR=.; } && test $(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $DESTDIR" -ex quit 'arch' && test -f arch.gdb-index && objcopy --add-section '.gdb_index=arch.gdb-index' --set-section-flags '.gdb_index=readonly' 'arch' 'arch' && rm -f arch.gdb-index || true
    Found architecture in binary
    CFG_HOST_ARCH="x86_64"
    CFG_HOST_CPUFEATURES=" mmx sse sse2"
    System architecture: 'unknown'
    Host architecture: 'x86_64'
    C++11 auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wc,-std=gnu++0x -Wall -W -fPIE-DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o c++11.o c++11.cpp
    C++11 disabled.
    floatmath auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD-I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o floatmath.o floatmath.cpp
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o freetype.o freetype.cpp
    FreeType disabled.
    STL auto-detection... ()
    qcc -Vgcc_ntoarmv7le -c -Wno-psabi -lang-c++ -O2 -Wall -W -fPIE -DQT_NO_CLIPBOARD -I../../../mkspecs/qnx-armv7le-qcc -I. -I/opt/qnx650/target/qnx6/usr/include -I/opt/qnx650/target/qnx6/usr/include/freetype2 -o stltest.o stltest.cpp
    STL disabled.
    STL functionality check failed! Cannot build Qt with this STL library.
    Turn on verbose messaging (-v) to /home/pasadeveloper/qt-everywhere-opensourcesrc-5.1.1/qtbase/configure to see the final report.
    

    更新: 我正在为ARM开发QNX,target是一款ARM平台设备。 事情越来越奇怪了。在Env Var中,我将

    $QNX_CONFIGURATION=/etc/qnx
    $QNX_JAVAHOME=/opt/qnx650/_jvm
    $QNX_TARGET=/opt/qnx650/target/qnx6
    $QNX_HOST=/opt/qnx650/host/linux/x86
    
    但是当我执行
    qmake qmake.conf
    mkspecs/qnx-armv7le-qcc文件夹时 它返回一条错误消息
    项目错误:QNX\u目标环境变量未设置

    我不知道现在发生了什么


    不仅仅是qmake qmake.conf 我尝试在另一台主机Ubuntu12.04-64位上构建Qt5.1.2。 也会收到相同的错误消息<代码>项目错误:未设置QNX_目标环境变量


    我在linux下从事Qt开发(仅供参考Ubuntu 12.04-64位),但我需要将这个程序编译成QNX的二进制文件。 我安装了QNX MOmentics IDE,它为我提供了QNX gcc。 但是我找不到qmakeqnx

    在QT/gcc_64/mkspecs/qnx-armv7le-qcc下,有一个文件名为qmake.conf。我想这就是我可以生成qmakeqnx的地方。运行qmake-o Makefile qmake.conf后,生成了一个Makefile

    但是,当我运行make时,出现了错误

    qcc -Vgcc_ntoarmv7le -lang-c++ -Wl,-rpath-link,/opt/qnx650/target/qnx6/armle-v7/lib -Wl,-rpath-link,/opt/qnx650/target/qnx6/armle-v7/usr/lib -Wl,-O1 -Wl,-O1 -Wl,-rpath,/home/pasadeveloper/Qt5.1.0/5.1.0/gcc_64 -Wl,-rpath,/home/pasadeveloper/Qt5.1.0/5.1.0/gcc_64/lib -o qmake    -L/opt/qnx650/target/qnx6/armle-v7/lib -L/opt/qnx650/target/qnx6/armle-v7/usr/lib -lm -L/home/pasadeveloper/Qt5.1.0//5.1.0/gcc_64/lib -lQt5Gui -lQt5Core -lGL -lpthread 
    
    cc:没有要处理的文件
    make:**[qmake]错误1
    pasadeveloper@ubuntu:~/Qt5.1.0/5.1.0/gcc_64/mkspecs/qnx-armv7le-qcc$

    你不会像那样“生成”你的qmake qnx。您应该使用本机qmake为目标生成适当的makefile,以帮助交叉编译。另外,在相关的mkspecs文件夹中运行
    qmake qmake.conf
    是错误的,因为这不是您可能认为的项目文件

    例如,在构建Qt本身时,您应该为目标使用适当的mkspecs文件,在这种情况下,如果它是为特定的arm qnx变体(称为
    qnx-armv7le-qcc
    构建的,那么它就是您上面提到的那个

    以下是下载相关Qt源(如5.1.1)后需要运行的确切命令:

    ./configure -opensource -confirm-license -xplatform qnx-armv7le-qcc -v
    
    对于这个QNX版本,底线是,如果没有SP1和libscreen,它将无法工作。QPA插件将链接到它。此库为新的QNX变体上的图形服务器提供API。你需要和你的QNX代表谈谈

    您可以找到有关该主题的更多信息

    $QNX_TARGET=/opt/qnx650/TARGET/qnx6

    可能没有做你想做的事。在shell脚本中,定义变量时,不在变量前面加“$”,只有在访问变量时:

    X=你好


    echo$X

    如果您指出您试图构建的QNX版本和平台,那么这个问题将更容易回答。