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. Sharedlib instead of executable file on ubuntu
Forum Updated to NodeBB v4.3 + New Features

Sharedlib instead of executable file on ubuntu

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 6 Posters 8.4k Views 2 Watching
  • 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Hi
    Can you post your .pro file?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      FED27
      wrote on last edited by
      #5

      QT += core gui
      QT += charts

      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      QT+=printsupport

      TARGET = Interfaccia
      TEMPLATE = app

      DEFINES += QT_DEPRECATED_WARNINGS

      SOURCES +=
      main.cpp
      mainwindow.cpp
      mylabel.cpp
      ../build-Interfaccia-Desktop_Qt_5_9_1_GCC_64bit-Debug/qcustomplot/qcustomplot.cpp
      analizzatore.cpp
      particle.cpp

      HEADERS +=
      mainwindow.h
      mylabel.h
      ../build-Interfaccia-Desktop_Qt_5_9_1_GCC_64bit-Debug/qcustomplot/qcustomplot.h
      analizzatore.h
      datastore.h
      datastore.h
      particle.h

      FORMS +=
      mainwindow.ui

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #6

        Hi, also check that you have Shadow builds enabled in Qt Creator.

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #7

          Looks like your double clicking on the executable and trying to run it. Are you getting the 'library not found' error ? if that is the case, Qt libraries may not be in the path. Please check the path and fix it

          Qn : Are you able to run your application from Qt Creator ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          1
          • F Offline
            F Offline
            FED27
            wrote on last edited by
            #8

            i've the "library not foung error" but if i run the app by terminal it works. Why?
            How i can fix the path?

            Yes i'm able to run my application from Qt Creator.

            jsulmJ 1 Reply Last reply
            0
            • F FED27

              i've the "library not foung error" but if i run the app by terminal it works. Why?
              How i can fix the path?

              Yes i'm able to run my application from Qt Creator.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #9

              @FED27 If you want your app to be runnable outside of QtCreator (or on other machines) you need to deploy it first.
              See http://doc.qt.io/qt-5/linux-deployment.html

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • F Offline
                F Offline
                FED27
                wrote on last edited by
                #10

                i' m trying this way but when i launch the command qmake -config release it gives me
                Project MESSAGE: Warning: unknown QT: charts

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  Hi,

                  As silly as it may sound, did you install all of Qt components ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    FED27
                    wrote on last edited by
                    #12

                    @SGaist solved but after i've launche the make and every is compiled i try to click on the app and the error is always "library not found"

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      Are you using a project template ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        FED27
                        wrote on last edited by
                        #14

                        SOLVED i used QMAKE_LFLAGS += -no-pie in the .pro file and it produced me an executable file instead of a library

                        1 Reply Last reply
                        1
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #15

                          Glad you found out and thanks for sharing !

                          Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum members may know what you are talking about.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          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