Results 1 to 7 of 7

Thread: Qt application from linux to windows

  1. #1
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Qt application from linux to windows

    Hello! I'm trying to develop an application in linux using QTCreator. It has a simple form with a button and a textedit. It works fine in linux but if I copy it to windows and I try to compile, appears some problems. How can I port a linux app to windows? I googled but i didn't find anything about this.

    Thanks

  2. #2
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application from linux to windows

    It works fine in linux but if I copy it to windows and I try to compile, appears some problems.
    What does it mean "problems"? How do you compile it? What's your compiler? Do you have some error messages? Give some more details.
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

  3. #3
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application from linux to windows

    Im using QtCreator in windows, but i did the program in linux, using QtCreator too.
    The error messages are like this one, and there are over 400:
    Qt Code:
    1. undefined reference to 'ZN12QApplicationC!ERiPPci'
    2. File not found: \home\chs\Escritorio\interfaz\main.cpp
    To copy to clipboard, switch view to plain text mode 
    I dont understand why it is looking for my linux home directory.

    Tell me if you need more information

    Thanks

  4. #4
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application from linux to windows

    Remove all Makefiles from your project directory, maybe it will help
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

  5. #5
    Join Date
    Nov 2009
    Posts
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application from linux to windows

    Thanks! I remove the debug files generated in linux: main.o, mainwindow.o and moc_mainwindow.o

    Now is compiles but in QtCreator I have this message:

    Qt Code:
    1. Starting ...
    2.  
    3. The process could not be started!
    To copy to clipboard, switch view to plain text mode 

    Then, i try to run it clicking in the .exe file but appears an error message because doesn't find "mingwm10.dll". Do you know what program must install?

    thank you

  6. #6
    Join Date
    Oct 2007
    Location
    Grenoble, France
    Posts
    80
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt application from linux to windows

    Now is compiles but in QtCreator I have this message:
    Qt Code:
    1. Starting ...
    2.  
    3. The process could not be started!
    To copy to clipboard, switch view to plain text mode 
    Maybe someone else will help you here, I don't know QtCreator to well, especially on Windows.

    Then, i try to run it clicking in the .exe file but appears an error message because doesn't find "mingwm10.dll". Do you know what program must install?
    You're compiling the code using MinGW which is part of QtSDK for Windows, so either add the directory containing this dll to your PATH or put it (the dll) in the same directory as your executable.
    You have to run a level 3 diagnostic.

    Ashes to ashes, Qt to Qt ( wysota )

  7. #7
    Join Date
    Sep 2009
    Location
    Finland
    Posts
    63
    Thanks
    1
    Thanked 22 Times in 19 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Qt application from linux to windows

    I have also seen similar behaviour and the reason for that was that the project settings were not correct! I see this behaviour if I copy folder (with source code and project files) from Ubuntu to Windows and try to compile the project.

    The solution I used was that after I opened the project in Windows Qt Creator I immediately select Projects and then Run Settings and on the right side of Run configuration: press the '+' button and select your project from the drop-down list again. When selecting it again it corrects the working directory etc. and after that you can execute your application (at least this was a solution for me).

    Before copying project from Linux to Windows remember to execute Build - Clean All, that will remove the object files etc.

Similar Threads

  1. How to make MAC version of Windows QT application
    By qtUser500 in forum Installation and Deployment
    Replies: 2
    Last Post: 8th October 2009, 14:27
  2. Replies: 2
    Last Post: 4th June 2009, 16:09
  3. Porting application from Linux to Win32
    By giusepped in forum Qt Programming
    Replies: 11
    Last Post: 2nd November 2008, 14:23
  4. Replies: 2
    Last Post: 9th June 2007, 19:19
  5. Replies: 4
    Last Post: 12th January 2006, 04:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.