QT Creator cannot run any of examples



  • I just installed QT SDK and first thing I did is check "Demos and Examples" but on EVERY "Run" I get some errors. They're most like this:
    [code]
    /usr/bin/ld: warning: libpng12.so.0, needed by /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_read_info@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_gAMA@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_tRNS@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_PLTE@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_filler@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_get_text@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_packing@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_write_rows@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_invert_mono@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_error_fn@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_write_chunk@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_get_image_width@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_IHDR@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_sig_bytes@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_read_update_info@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_write_fn@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_write_end@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_create_read_struct@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_read_image@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_gray_to_rgb@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_IHDR@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_get_channels@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_strip_16@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_expand@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_pHYs@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_create_write_struct@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_gAMA@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_write_info@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_text@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_get_PLTE@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_oFFs@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_destroy_write_struct@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_io_ptr@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_get_image_height@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_y_pixels_per_meter@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_compression_level@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_x_pixels_per_meter@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_gamma@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_destroy_read_struct@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_read_end@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_packswap@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_sBIT@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_error@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_write_image@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_set_read_fn@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_tRNS@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_create_info_struct@PNG12_0' /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference topng_set_bgr@PNG12_0'
    /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to png_get_valid@PNG12_0' collect2: ld returned 1 exit status make: *** [annotatedurl] Error 1 make: Leaving directory/home/broi/QtSDK/Examples/QtMobility/annotatedurl-build-simulator-Simulator_Qt_for_GCC__Qt_SDK__Release'
    19:56:28: The process "/usr/bin/make" exited with code 2.
    Error while building project annotatedurl (target: Qt Simulator)
    When executing build step 'Make'
    [/code]
    I have libpng installed.

    I'm using Linux 32bit





  • Thanks, but I already have installed those dependencies...



  • Hm. Interesting. I use Ubuntu 10.04. I had installed the dependency packages and after this I installed the Qt SDK and I have had no problems with Examples and Demos... Maybe you have problem with PATH?



  • [quote author="broadpeak" date="1331629588"]Hm. Interesting. I use Ubuntu 10.04. I had installed the dependency packages and after this I installed the Qt SDK and I have had no problems with Examples and Demos... Maybe you have problem with PATH?[/quote]

    I guess..... How to fix PATH?





  • sweet gtk.


  • Moderators

    Run ldd on the library and find out whether any libraries are missing.

    If so: Install them (including the development packages!) and/or set LD_LIBRARY_PATH to point to the directories containing the .so files needed.

    If all libraries are found: The png shipped with your distribution is too old (or new, IIRC there was a binary breakage in libPNG recently) and you will need to build Qt yourself to fix this. You can also try to get Qt from your distributor, they should have one that works for their system.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.