3

I want to run a Qt application in Linux which is compiled on Windows using Qt Creator.

I tried googling but I did not get any answers regarding Qt creator. I found for Visual studio. Can anyone please let me know if this can be done in Qt Creator in Windows7 ? Do I need to install any other compilers ?

Thanks in advance.

3
  • 3
    Yes you need to install a cross compiler that works on Windows but generates Linux executables. Commented Aug 21, 2014 at 10:52
  • Thank you sir for a quick reply. Can you please help a little bit more by letting me know which cross compiler is a better option and where can I download. I am actually new to this. Commented Aug 21, 2014 at 10:54
  • 2
    Why do you want to do that? Why not install Linux on your machine? Commented Aug 21, 2014 at 17:05

2 Answers 2

9

If you don't want to install Linux, I think the best way is using a Virtual Machine. That's because even if the source code compiles for Linux, how could it be verified to run? You will need a real target environment to finally test your application.

From a complexity point of view, I think setting up a Linux machine (VM or not) and the necessary environment for Qt is a whole lot simpler than cross compiling bug hunting afterwards.

You can install Qt on the installed Linux, copy your project there, compile it and see the results in the real environment. This way you can cope with the minor differences when porting from one OS to another easily.

Sign up to request clarification or add additional context in comments.

2 Comments

Why did you edit the question to spell googling "goggling"?
&SketchBookGames That was a mistake. It's fixed now.
0
  • I have installed Qt for Ubuntu Linux in my virtual machine. The file that I have used is qt-opensource-linux-x86-5.3.1.run.
    • I installed g++ and other dependent libraries in Ubuntu as compiler for Qt was not available in this installation file.
    • Then I took the Qt project file that was build in Windows and build the same in Ubuntu.

Thanks and regards Sid

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.