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. Qt program under linux problem
Forum Updated to NodeBB v4.3 + New Features

Qt program under linux problem

Scheduled Pinned Locked Moved General and Desktop
8 Posts 5 Posters 2.7k Views 1 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.
  • H Offline
    H Offline
    henryxuv
    wrote on last edited by
    #1

    My code execute well under window 7, I transferred it to linux, complied under linux. All work seemed well, I can start the program from qt creator perfectly. But without the qt creator, my program wouldn't execute and no message . When I try to start it from console. finally I got a message "Segmentation falut" from console.
    My question is what make my program can only started from qt creator. what should I do to make it can be started directly? (I create a simple MainWindow project, the MainWindow program can execute directly)If it is my code has problem?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aabc
      wrote on last edited by
      #2

      Did you run it on Windows without QtCreator ?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        soroush
        wrote on last edited by
        #3

        Did you try debugging?

        1 Reply Last reply
        0
        • H Offline
          H Offline
          henryxuv
          wrote on last edited by
          #4

          My program execute normally under window7. no matter from qt creator or directly. Under linux, from Qt creator debuging or not both can execute normally too.but cannot run directly by double click.When I try to run from console, I got the message segmantation fault.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            [quote author="henryxuv" date="1344515461"]My program execute normally under window7. no matter from qt creator or directly. Under linux, from Qt creator debuging or not both can execute normally too.but cannot run directly by double click.When I try to run from console, I got the message segmantation fault.[/quote]

            You need to debug under Linux then.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • H Offline
              H Offline
              henryxuv
              wrote on last edited by
              #6

              when debugging everything is normal, I can't find any error. Is anybody met this kind of problem before?

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #7

                [quote author="henryxuv" date="1344517216"]when debugging everything is normal, I can't find any error. Is anybody met this kind of problem before?[/quote]
                Assuming that you mean running the program with the debugger under linux.
                If it runs in the debugger on linux, it may most likely run directly also under linux as long as you use the debug settings for compilation.
                So, it could have something to do with the optimization of the compiler. You need to check with different optimization settings for compilation of your own application.

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  tobias.hunger
                  wrote on last edited by
                  #8

                  ... or with your environment. Maybe it fails to find some libraries (or picks up a wrong version somewhere). Check the run environment in Qt Creator and make sure LD_LIBRARY_PATH, PATH and others are sensible for your setup. Try just setting the values found in Creator before running your application.

                  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