March 12, 2012

broi broi
Lab Rat
4 posts

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:

  1. /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)
  2. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_read_info@PNG12_0'
  3. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_gAMA@PNG12_0'
  4. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_tRNS@PNG12_0'
  5. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_PLTE@PNG12_0'
  6. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_filler@PNG12_0'
  7. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_text@PNG12_0'
  8. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_packing@PNG12_0'
  9. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_write_rows@PNG12_0'
  10. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_invert_mono@PNG12_0'
  11. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_error_fn@PNG12_0'
  12. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_write_chunk@PNG12_0'
  13. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_image_width@PNG12_0'
  14. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_IHDR@PNG12_0'
  15. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_sig_bytes@PNG12_0'
  16. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_read_update_info@PNG12_0'
  17. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_write_fn@PNG12_0'
  18. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_write_end@PNG12_0'
  19. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_create_read_struct@PNG12_0'
  20. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_read_image@PNG12_0'
  21. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_gray_to_rgb@PNG12_0'
  22. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_IHDR@PNG12_0'
  23. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_channels@PNG12_0'
  24. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_strip_16@PNG12_0'
  25. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_expand@PNG12_0'
  26. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_pHYs@PNG12_0'
  27. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_create_write_struct@PNG12_0'
  28. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_gAMA@PNG12_0'
  29. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_write_info@PNG12_0'
  30. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_text@PNG12_0'
  31. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_PLTE@PNG12_0'
  32. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_oFFs@PNG12_0'
  33. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_destroy_write_struct@PNG12_0'
  34. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_io_ptr@PNG12_0'
  35. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_image_height@PNG12_0'
  36. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_y_pixels_per_meter@PNG12_0'
  37. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_compression_level@PNG12_0'
  38. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_x_pixels_per_meter@PNG12_0'
  39. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_gamma@PNG12_0'
  40. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_destroy_read_struct@PNG12_0'
  41. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_read_end@PNG12_0'
  42. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_packswap@PNG12_0'
  43. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_sBIT@PNG12_0'
  44. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_error@PNG12_0'
  45. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_write_image@PNG12_0'
  46. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_read_fn@PNG12_0'
  47. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_tRNS@PNG12_0'
  48. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_create_info_struct@PNG12_0'
  49. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_set_bgr@PNG12_0'
  50. /home/broi/QtSDK/Simulator/Qt/gcc/lib/libQtGui.so: undefined reference to `png_get_valid@PNG12_0'
  51. collect2: ld returned 1 exit status
  52. make: *** [annotatedurl] Error 1
  53. make: Leaving directory `/home/broi/QtSDK/Examples/QtMobility/annotatedurl-build-simulator-Simulator_Qt_for_GCC__Qt_SDK__Release'
  54. 19:56:28: The process "/usr/bin/make" exited with code 2.
  55. Error while building project annotatedurl (target: Qt Simulator)
  56. When executing build step 'Make'

I have libpng installed.

I’m using Linux 32bit

7 replies

March 12, 2012

broadpeak broadpeak
Hobby Entomologist
360 posts

Hope this helps:
http://doc.qt.nokia.com/4.7-snapshot/requirements-x11.html

March 12, 2012

broi broi
Lab Rat
4 posts

Thanks, but I already have installed those dependencies…

March 13, 2012

broadpeak broadpeak
Hobby Entomologist
360 posts

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?

March 13, 2012

broi broi
Lab Rat
4 posts
broadpeak wrote:
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?

I guess….. How to fix PATH?

March 13, 2012

broadpeak broadpeak
Hobby Entomologist
360 posts

This?:
http://doc.qt.nokia.com/qtcreator-2.4/creator-project-qmake.html

March 13, 2012

broi broi
Lab Rat
4 posts

sweet gtk.

March 14, 2012

Tobias Hunger Tobias Hunger
Mad Scientist
3128 posts

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.

 
  ‹‹ Compiling Qt-4.8.0 in RHEL 4 gives an error      "network error" while building for symbian ››

You must log in to post a reply. Not a member yet? Register here!