qrc files V-Studio2010 + V_GDB

Sysprogs forums Forums VisualGDB qrc files V-Studio2010 + V_GDB

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #707
    toman
    Participant

    How to “include” qrc file (QT4 resource files) to V_Studio 2010 Qt C++ project for RaspberryPi. I tested your cross-compile Qt project, successfully, after changing project structure to “double inheritance”,also with new created buttons and labels (without Qt designer plugin, by manually editing ui form).All Works well, on PC, also on Raspberry.
    But I wish to load some pictures in labels.I tried to do everything i found in manuals and forums, to add qrc resource file with picture to project, (compiling go without errors), but no pictures in labeles.I have some experiance with Qdevelop and Qt-Creator, but with VStudio and Qt its my first attempt.
    Is it possible in such configuration (with VGDB)? If is,will be very valuable, not only for me.
    Regards Toman D.

    #2857
    ket
    Participant

    Hi,

    A similar issue was recently reported. VisualGDB version 4.1r8 included a fix that could affect building when qrc files are present, but we were unable to replicate the issue of images not showing up.

    We have attached the project we used to test images and qrc files, it is based on a Qt example project. The Debug configuration builds on the Raspberry Pi, the Debug2 configuration uses the cross-compiler. Feel free to try it out to see if images show up for you. You will at least need to change the SSH connection setting to Raspberry Pi in VisualGDB Project Properties to use the project.

    Please let us know if the project works for you. If it does work, then it would be helpful if you could tell what is different between the non-working and working projects i.e. what makes the images not show up.

    #2858
    toman
    Participant

    Thank You on quick answer.I will tray with your “addition”, and inform You about results.
    Today, before i saw your answer, i try to do something, to compile xxx.qrc file outside VGDB project, with rcc compiler (rcc.exe).Compiler is allredy installed during VGDB installation.After compiling, i copied produced cpp file ( qrc_xxx.cpp ) to same directory with xxx.qrc and source files, and “include” to project.After this, finally i have pictures. All works on PC and also on Raspberry-Pi.Before, i dont saw this cpp file, and probably “make” dont do compiling of xxx.qrc.
    Regards, Toman D.

    #2859
    ket
    Participant

    Hi,

    The generated Makefile should contain a call to rcc.exe, so make should also call rcc.exe automatically.

    If you build your project with VisualGDB, in the Output window does the build output contain a call to rcc.exe? If it does not, does the generated Makefile in the project directory contain a call to rcc.exe ?

    #2860
    toman
    Participant

    Hi !
    Today, i “tested” your Qt projects for R-Pi,
    With first configuration,( compiling on R-Pi), all works well. There is picture on PC, and after i “checked” “deployment of executive…” in VGDB configuration, there is picture also on R-Pi screen (when deployed executive is started)..

    With second configuartaion,( crosscompiling locally on PC), there is error during build process, concerned with resource compiler, interesting. Compiler is “selected” on E: drive, instead of C: (E: is DVD drive in my case).
    e:/Qt/4.8.5/bin/rcc.exe -name basicgraphicslayouts basicgraphicslayouts.qrc -o Debug2/qrc_basicgraphicslayouts.cpp

    There is complete “output log”
    Thanks on cooperation, I wish Happy Holidays and success in New Year for You and your colleagues!

    1>

    Rebuild All started: Project: RaspberryQt, Configuration: Debug2 Win32

    1>Build started 12/23/2013 4:56:42 PM.
    1>CoreClean:
    1> VisualGDB: Attempting inline build…
    1> VisualGDB: Executing preclean actions
    1> VisualGDB: Run “cmd /c rmdir /s /q “Debug2″” in directory “C:VS_tdRaspberryQtRaspberryQt” on local computer
    1> Debug2RaspberryQt.log – The process cannot access the file because it is being used by another process.
    1> VisualGDB: Executing postclean actions
    1>Rebuild:
    1> VisualGDB: Attempting inline build…
    1> VisualGDB: Executing preclean actions
    1> VisualGDB: Run “cmd /c rmdir /s /q “Debug2″” in directory “C:VS_tdRaspberryQtRaspberryQt” on local computer
    1> Debug2RaspberryQt.log – The process cannot access the file because it is being used by another process.
    1> VisualGDB: Executing postclean actions
    1> VisualGDB: Executing prebuild actions
    1> VisualGDB: Run “C:SysGCCraspberryQtv4qmake.exe RaspberryQt.pro CONFIGNAME=Debug2” in directory “C:VS_tdRaspberryQtRaspberryQt” on local computer
    1> VisualGDB: Run “cmd.exe /c “C:SysGCCraspberrybinmake.exe”” in directory “C:VS_tdRaspberryQtRaspberryQt” on local computer
    1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -IDebug2 -o Debug2/layoutitem.o layoutitem.cpp
    1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -IDebug2 -o Debug2/main.o main.cpp
    1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -IDebug2 -o Debug2/window.o window.cpp
    1> C:/SysGCC/raspberry/Qt/v4/moc.exe -DQT_GUI_LIB -DQT_CORE_LIB -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -IDebug2 window.h -o Debug2/moc_window.cpp
    1> C:/SysGCC/raspberry/bin/arm-linux-gnueabihf-g++.exe -c -pipe -Wno-psabi -g -Wall -W -D_REENTRANT -DQT_GUI_LIB -DQT_CORE_LIB -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/share/qt4/mkspecs/arm-linux-gnueabihf -I. -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtCore -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4/QtGui -I../../../sysgcc/raspberry/arm-linux-gnueabihf/sysroot/usr/include/qt4 -IDebug2 -o Debug2/moc_window.o Debug2/moc_window.cpp
    1> e:/Qt/4.8.5/bin/rcc.exe -name basicgraphicslayouts basicgraphicslayouts.qrc -o Debug2/qrc_basicgraphicslayouts.cpp
    1> process_begin: CreateProcess(NULL, e:/Qt/4.8.5/bin/rcc.exe -name basicgraphicslayouts basicgraphicslayouts.qrc -o Debug2/qrc_basicgraphicslayouts.cpp, …) failed.
    1> make (e=21): The device is not ready.
    1>
    1> make: *** [Debug2/qrc_basicgraphicslayouts.cpp] Error 21
    1>

    1> Command exited with code 2
    1> Executable: cmd.exe
    1> Arguments: /c “C:SysGCCraspberrybinmake.exe”
    1> Directory: C:VS_tdRaspberryQtRaspberryQt
    1>EXEC : error : Build has failed. See the Output window for more details.
    1>C:Program FilesMSBuildMicrosoft.Cppv4.0Microsoft.MakeFile.Targets(43,5): error MSB3073: The command “”C:Program FilesSysprogsVisualGDB\VisualGDB.exe” /rebuild “C:VS_tdRaspberryQtRaspberryQtRaspberryQt.vcxproj” “/solution:C:VS_tdRaspberryQtRaspberryQt.sln” “/config:Debug2” “/platform:Win32″” exited with code 1.
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:08.04
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    #2861
    ket
    Participant

    Hi,

    Happy Holidays to you as well!

    The cross-compilation issue was fixed in VisualGDB version 4.1r8, so just update VisualGDB to the latest version and repatch the cross-compilation Qt to fix that (delete the Qt subfolder and the sysroot contents from the Raspberry Pi toolchain location and make another new Raspberry Pi cross-toolchain project).

    Probably what is missing from your project is the listing of the resource file. Look into our project example, in the file RaspberryQt.pro there is the following line:

    RESOURCES = basicgraphicslayouts.qrc

    Your project’s pro file should contain a similar line. Please note that currently VisualGDB does not update the resources list automatically, so you need to add this line manually.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.