How to build qt out of source

ⅰ亾dé卋堺 提交于 2019-12-03 04:44:01

Basically, you just have to run configure.exe from your build directory. For example:

mkdir \qt\4.5.2-build
cd \qt\4.5.2-build
set PATH=%cd%\bin;%PATH%
\qt\4.5.2-sources\configure.exe -platform win32-msvc2005

Where sources are in \qt\4.5.2-sources, that would cause the build to go into \qt\4.5.2-build on the current drive.

Also, you must have perl in your PATH, ActiveState Perl is suggested.

I had not previously heard of this limitation where the build and source directories must be at the same level. If you hit this problem you could try working around it by creating a symbolic link (see mklink command).

IIRC on Windows, you have to do a sandbox install, you can't do the UNIX-typical "make install".

There are two options usually for building Qt, -prefix-install and -prefix /foo

You pick one, so if -prefix doesn't allow you to type make install, then I guess on Windows you have to use the -prefix-install route, which is a sandboxed install to the directory you extract Qt to.

I'm guessing you didn't try make install? So try that. It should install Qt to a separate directory away from the sources.

At least the problem with the missing include files (e.g. qscriptengine.h) may by solved by temporary adding \qt\4.5.2-sources\include\Qt to the include path.

I moved the shadow build out of my home folder to a folder in C: and it worked. I know it's weird, but that's what happened. I suspect it must be a bug in syncqt.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!