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. Windows Code -> Linux
QtWS25 Last Chance

Windows Code -> Linux

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 3.5k Views
  • 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 Offline
    M Offline
    mrstarware
    wrote on last edited by
    #1

    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
    0
    • V Offline
      V Offline
      VanDerSam
      wrote on last edited by
      #2

      First you should present error messages.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        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
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            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
            0
            • M Offline
              M Offline
              mrstarware
              wrote on last edited by
              #6

              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
              0
              • M Offline
                M Offline
                mlong
                wrote on last edited by
                #7

                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
                0
                • M Offline
                  M Offline
                  mrstarware
                  wrote on last edited by
                  #8

                  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
                  0
                  • M Offline
                    M Offline
                    mlong
                    wrote on last edited by
                    #9

                    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
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved