10 Replies - 350 Views - Last Post: 12 February 2014 - 07:57 AM Rate Topic: -----

#1 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 130
  • Joined: 08-May 13

C++ Qt program won't run outside of IDE

Posted 09 February 2014 - 05:16 PM

Every time I navigate to my debug (AND release) folder, I click the executable and I get a bunch of popups saying that I am missing DLL files. (The very first popup is Qt5Cored.dll)

But inside the Qt creator, it works. Can you guys help me?
Is This A Good Question/Topic? 0
  • +

Replies To: C++ Qt program won't run outside of IDE

#2 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1046
  • View blog
  • Posts: 4,449
  • Joined: 09-June 09

Re: C++ Qt program won't run outside of IDE

Posted 09 February 2014 - 05:41 PM

You application is failing when it links during runtime, you can use dependency walker and (http://www.dependencywalker.com/) to see what DLL your application depends on. Once you discover those, you can simply copy them to the path where your executable exists.

Edit, another option is to set up your paths correctly to point to the missing dlls.

This post has been edited by jjl: 09 February 2014 - 05:42 PM

Was This Post Helpful? 0
  • +
  • -

#3 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1131
  • View blog
  • Posts: 2,484
  • Joined: 05-May 05

Re: C++ Qt program won't run outside of IDE

Posted 09 February 2014 - 06:49 PM

Ambitious: You need to make sure the machine has the Qt library installed.
Was This Post Helpful? 0
  • +
  • -

#4 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1046
  • View blog
  • Posts: 4,449
  • Joined: 09-June 09

Re: C++ Qt program won't run outside of IDE

Posted 09 February 2014 - 08:42 PM

@blackcompe, If he can run it inside of the IDE, then that implies he has Qt installed

This post has been edited by jjl: 10 February 2014 - 04:17 PM

Was This Post Helpful? 0
  • +
  • -

#5 Black_Epiphany  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 60
  • Joined: 02-February 14

Re: C++ Qt program won't run outside of IDE

Posted 10 February 2014 - 04:05 PM

What I do is just copy all the .dll files used for that specific program into the folder where my executable is located. Then I make a shortcut to the executable.
Was This Post Helpful? 0
  • +
  • -

#6 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1046
  • View blog
  • Posts: 4,449
  • Joined: 09-June 09

Re: C++ Qt program won't run outside of IDE

Posted 10 February 2014 - 04:20 PM

That is one option, you can also set your library path to where those dlls are located on your machine.

Qt has a deployment tool which looks like you can statically link all of your dependencies

http://qt-project.or...nt-windows.html


Scratch that, looks like Qt recommends you copy all relevant dlls to your working directory.

This post has been edited by jjl: 10 February 2014 - 04:29 PM

Was This Post Helpful? 1
  • +
  • -

#7 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 130
  • Joined: 08-May 13

Re: C++ Qt program won't run outside of IDE

Posted 10 February 2014 - 09:00 PM

After I copy all the DLL files I get this:

Posted Image
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3163
  • View blog
  • Posts: 9,559
  • Joined: 05-May 12

Re: C++ Qt program won't run outside of IDE

Posted 10 February 2014 - 09:28 PM

Something seems to be very wrong with your build if your executable is being treated by windows as a dynamic link library. Additionally, the WinMain() entry point should not be defined with all those decorations. Something is definitely messed up with your build script or project.
Was This Post Helpful? 0
  • +
  • -

#9 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 130
  • Joined: 08-May 13

Re: C++ Qt program won't run outside of IDE

Posted 11 February 2014 - 08:53 PM

So, what should I do now?
Was This Post Helpful? 0
  • +
  • -

#10 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 710
  • View blog
  • Posts: 2,033
  • Joined: 20-March 10

Re: C++ Qt program won't run outside of IDE

Posted 11 February 2014 - 11:09 PM

reinstall Qt Creator and the whole works.

I would delete everything first then reinstall.

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#11 Ambitious  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 130
  • Joined: 08-May 13

Re: C++ Qt program won't run outside of IDE

Posted 12 February 2014 - 07:57 AM

So I have to wait another 6 hours for it to download? Because the installer doesn't already contain the file for it. The Qt installer that yoi get from the website actually downloads it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1