Umer Farooq
Umer Farooq

Reputation: 7486

Running Qt program without IDE

How can i run a program which already has been built and compiled before on Qt IDE, so that i can take that program and run on any computer I want without recompiling it on that computer. I am a beginner so bare answering this question.:)

Thanks

Upvotes: 0

Views: 1395

Answers (3)

Mahmoud
Mahmoud

Reputation: 1

Every Architect has a set of CPU Instructions.

so it's like when you hear a language that you don't understand. like when i speak Arabic To Someone who don't Understand The Language.

Every Architect Has a set of Processor Instructions, The Compiler only convert the code into instruction only understood by The Architecture that your CPU is.

That's Why Python and the most of High level languages Use Interpreter Instead of a Compiler.

But There are some cross compilers like MinGw that Support Cross compiling To Windows (.exe files)

Simply QT Have some libraries important to be in the working directory for your project.

Upvotes: -1

Wes Hardaker
Wes Hardaker

Reputation: 22272

There are a few parts to your problem.

1) You need to compile it for each architecture you want it to be used on.

2) Each architecture will have a set of Qt dynamic libraries associated with it too that need to be available.

3) Some architectures have an easy-to-deploy mechanism. EG, on a mac you can run "macdeployqt" to get the libraries into the application directory. For nokia phones (symbian, harmattan (N9), etc) QtCreator has a deploy step that will build a package for the phone and even include an icon.

4) For systems without such a feature, like linux and windows, you'll either need to distribute the binary and require the user to have Qt available or to package up a directory/zip containing the needed Qt libraries and distribute that.

Upvotes: 2

UmNyobe
UmNyobe

Reputation: 22920

It doesn't launch because it cannot find the dependencies. As you are on Windows, these libraries can be moved in the same directory as your application. To find which library is missing, use dependency walker

I am pretty sure these libraries are not found:

  • The Qt dynamic libraries (can be found on Qt bin directory, take the dll)
  • The C dynamic libraries used for compilation. If you are on creator and use default setting it will be mingw-xxx(can be found in the Qt installation directory, don t know exactly where)

Upvotes: 1

Related Questions