Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Windows Code -> Linux

    General and Desktop
    4
    9
    3072
    Loading More Posts
    • 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.
    • M
      mrstarware last edited by

      Hi. I have some Qt Widgets code (program) that I want to move to fedora 16. I have fedora 16 installed along with Qt SDK 32 bit.

      The problem is when I try to just regularly open the project file, I can't build. It's telling me something about no target rule.

      What is the standard procedure for using Qt Code originally written in Windows to run in linux?

      Thanks,
      mrstarware

      1 Reply Last reply Reply Quote 0
      • V
        VanDerSam last edited by

        First you should present error messages.

        1 Reply Last reply Reply Quote 0
        • M
          mlong last edited by

          What is the exact message you're getting about the target rule?

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply Reply Quote 0
          • T
            tobias.hunger last edited by

            Is this a qmake based project (does it have a .pro-file)? How did you build it on windows?

            1 Reply Last reply Reply Quote 0
            • ?
              Guest last edited by

              My noob approach at porting my code to another platform is instead of using the original project and modify target rules I just create a new project and import all sources from the old project and let Creator do all the work for me. Usually, everything works just fine, without any modifications to the actual program source, tested this for apps I wrote in windows and successfully ported them to Linux and Android.

              Yes, I know it is lame but IT WORKS :) That being said, there are more sophisticated and efficient ways to do it as well.

              1 Reply Last reply Reply Quote 0
              • M
                mrstarware last edited by

                Hi, Sorry it took so long for me to reply. I have found the error. The .pro file was updated incorrectly, I'm assuming I added a file wrong. The problem now however, is that I have both updated that file and created a new project, and the GUI is still not correct. The project will now compile just fine, however, the Forms Builder data doesn't seem to have updated. I even copied and pasted directly on top of the old file in the folder in an attempt to make sure everything updated correctly. (Effectively I just replaced the form file) So how do I save form builder data across platforms?

                Thanks,
                mrstarware

                1 Reply Last reply Reply Quote 0
                • M
                  mlong last edited by

                  So long as your cpp files are listed in the SOURCES variable, and the .h files are in the HEADERS variable, and the .ui files are in the FORMS variable, you should pretty much be there.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mrstarware last edited by

                    Ok, so I was messing around with the .pro file again and then was able to build the gui in debug mode. However, when it's in release mode it still doesn't work? and I think I've done about as much editing to the .pro as I know how.
                    @#-------------------------------------------------

                    Project created by QtCreator 2012-02-28T14:15:23

                    #-------------------------------------------------

                    QT += core gui

                    TARGET = MyProject
                    TEMPLATE = app

                    SOURCES += main.cpp
                    SOURCES += mainwindow.cpp

                    HEADERS += mainwindow.h

                    FORMS += mainwindow.ui@

                    Is it possible that something isn't installed correctly? or that my QT Creator has a bad setting? Why can it build in debug but not switch to release?

                    Thanks again,
                    mrstarware

                    1 Reply Last reply Reply Quote 0
                    • M
                      mlong last edited by

                      Are you, by chance, sharing the .pro.user file from your original build environment? If so, you shouldn't be.

                      Software Engineer
                      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post