1

I've just built the Qt libraries (on Windows) from source and it seems that the build-path is actually built into the library binaries themselves! This makes moving the binaries to another machine or directory difficult (but not impossible - see Change Qt install path after building?)

I've never come across this in any other library I've used and was wondering why it is the way it is? Is this just a remnant of a solution some obscure unix "install" issue, or is there a good reason for it?

Community
  • 1
  • 1
timpatt
  • 303
  • 1
  • 9

1 Answers1

3

These paths are used on windows to search for plugins, translations, etc. If you install Qt via a Qt installer, one of the steps in the installer is to patch the path inside the binaries so they contain the installation path. You can override them by patching the binaries, or, much easier, by using a qt.conf file.

Frank Osterfeld
  • 24,815
  • 5
  • 58
  • 70
  • If I get it right, this only applies when you want to modify some of the sub directories, e.g. use `mytranslations` instead of `translations`, right? (`All paths are relative to the Prefix. On Windows and X11, the Prefix is relative to the directory containing the application executable.`). So, as long as the sub directory hierarchy is the same, it is still possible to install into any directory (I did that earlier and did not have the issue mentioned by the OP) – Andreas Fester Jan 09 '13 at 10:13
  • right, the main use case for qt.conf would be other directory layouts than you described or moving a qt build used for development (where source and build dirs are somewhere else) – Frank Osterfeld Jan 10 '13 at 06:51