Running a app - Error



  • Hello guys! After i config my app to release and make, i pass my app to my friend to run, and this error appears: ./Pandora: symbol lookup error: ./Pandora: undefined symbol: _ZN13QOpenGLWidgetC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE

    Why this happens? Thanks


  • Moderators

    Hi,

    @Lays147 said:

    ./Pandora: symbol lookup error: ./Pandora: undefined symbol: _ZN13QOpenGLWidgetC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE

    Why this happens?

    Your friend's app is loading the wrong version of libQt5Widgets.so.5.

    1. Did you give your friend a copy of your *.so.5 files?
    2. Did you change the app's RPATH like I suggested in this thread?

    If you did these two steps correctly, your friend's app will not show this error message.



  • @JKSH Well, i copied all files .so.5 to this folder qtfiles then i did the comands:
    lays@lays:~$ cd PandoraRun/
    lays@lays:~/PandoraRun$ chrpath -r ./qtlibs Pandora
    Pandora: RPATH=$ORIGIN
    Pandora: new RPATH: ./qtlibs
    lays@lays:~/PandoraRun$

    And sent the code to my friend, he run and occurred segmentation fault.
    How do I fix it?


  • Moderators

    @Lays147 said:

    lays@lays:~/PandoraRun$ chrpath -r ./qtlibs Pandora

    That won't work, because it sets the RPATH to /home/lays/PandoraRun/qtlibs/. If you do this, your friend will need to create a directory called /home/lays/PandoraRun/qtlibs/ on his computer and put the Qt libraries there.

    1. Please read the tutorial I gave you again, and use
      $chrpath -r \$ORIGIN Pandora

    2. Put the *.so.5 files in the same directory as your app.

    3. Run the app on your own machine. Does it run correctly?
      $./Pandora

    4. If #3 works, send the app and shared libs to your friend.



  • @JKSH Well, did work. But i cant put de libs on a folder? And de app look that folder to run?
    I tried $chrpath -r $ORIGIN\qtlib2 Pandora and $chrpath -r $ORIGIN/qtlib2 Pandora
    But the error : ./Pandora: symbol lookup error: ./Pandora: undefined symbol: _ZN13QOpenGLWidgetC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE appears again. I think that i need set the Library_path, yep? How do i that? In a script file?

    Then i do the #1, and the app runs normally. With the *so files at the same folder that my app.
    And, when my friend run the app this error occurs:
    This application failed to start because it could not find or load the Qt platform plugin "xcb".

    Reinstalling the application may fix this problem.
    Abortado (imagem do nĂșcleo gravada)

    This lib libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3cf3cb1000) is default on linux, and did copy to the libs folder.
    How do i fix it? Exists any tutorial step by step to help me?
    thanks!


  • Moderators

    @Lays147 said:

    And, when my friend run the app this error occurs:
    This application failed to start because it could not find or load the Qt platform plugin "xcb".
    ...
    How do i fix it? Exists any tutorial step by step to help me?

    This error means you did not provide platform/libqxcb.so.

    The tutorial I gave you shows you how to fix it: http://www.tripleboot.org/?p=138. Look at the screenshot at "Debian/Ubuntu GCC bare bones deployment files" -- make sure you provide all these files.



  • @JKSH This img of qt version: http://i62.tinypic.com/dhaiqb.png
    I'm use the qt creator and qt version 5.4.2 downloaded of qt.io


Log in to reply
 

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