0

I'm putting together a Qt5.1 build for our team to use for our project. I was able to build 32 and 64 bit binaries with debug symbols using the instructions here.

I built using VS2012.

After finishing the build I copied the bin, lib and include folders to our resources folder and all was well. However, a couple weeks later I moved the folder I had built from, and my application stopped running giving me the error.

This application failed to start because it could not find or load the Qt platform plugin "windows".

I thought this was odd so I began digging around. I found that there were many references in my build to the original build directory.

I could just keep the build folder the same as it was before or point the compiler to the original directories, however, on other people's machines this might not work if they don't have the same drive letters.

Is there any way to build Qt5 so that it does not use absolute paths? I imagine there must otherwise nobody would be able to distribute it.

Boumbles
  • 2,473
  • 3
  • 24
  • 42
  • 1
    See here: http://stackoverflow.com/questions/4699311/how-to-install-qt-on-windows-after-building – Frank Osterfeld Nov 01 '13 at 17:43
  • Thanks, that question pretty much answers my question. I don't think I will delete this question as the wording I was using to search for related answers didn't bring yours up. Might help other people find what they are looking for. – Boumbles Nov 07 '13 at 16:59

1 Answers1

1

You need to add a qt.conf file in your BIN directory.

[Paths]
Prefix = $(QTDIR)

Then set an environment variable called QTDIR with the path to your QT files.

JasonM
  • 111
  • 1
  • 3