Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]QImageReader problem in console app

[solved]QImageReader problem in console app

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    akrynski
    wrote on last edited by
    #1

    Hi!
    I get following error:
    @C:/PROGRAMOWANIE/QtSDK/mingw/bin/mingw32-make.exe -f Makefile.Release
    mingw32-make.exe[1]: Entering directory C:/PROGRAMOWANIE/projekty/Qt/moje/dirs-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release' g++ -Wl,-s -Wl,-subsystem,console -mthreads -o release\dirs.exe release/main.o -L"c:\PROGRAMOWANIE\QtSDK\Desktop\Qt\4.8.0\mingw\lib" -lQtCore4 mingw32-make.exe[1]: Leaving directory C:/PROGRAMOWANIE/projekty/Qt/moje/dirs-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release'
    release/main.o:main.cpp:(.text+0x8c): undefined reference to `_imp___ZN12QImageReader21supportedImageFormatsEv'
    collect2: ld returned 1 exit status
    mingw32-make.exe[1]: *** [release\dirs.exe] Error 1
    mingw32-make.exe: *** [release] Error 2@

    when compiling on Windows. With Ubuntu all goes right, with no problem so it must be something with included header file for this class.
    The code that i use is following:
    @foreach (QByteArray format, QImageReader::supportedImageFormats())@

    Any idea how to solve it?

    --
    Pozdrawiam i do następnego...
    Greetings and till next...

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      QImageReader is in the QtGui module, to which you obivously don't link to.

      Did you forget <code>QT += gui</code> in your .pro file?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        akrynski
        wrote on last edited by
        #3

        Holly s... what a shame ;)
        yeah I had QT -=gui
        But...
        I compiled it earlier on Linux without any errors. Strange. :o
        Thanks a lot.

        --
        Pozdrawiam i do następnego...
        Greetings and till next...

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved