 advantage of being free.
I guess you already own Pro version of VS 2010 (since you can compile x64) – so why don’t you use it for development?
P.S. I’m impressed by the work of WatershedSciences.com company. I worked on similar projects here in Japan for AeroAsahi company. I developed compression algorithms for data from laser measurement & huge aerial images. Earth is pretty small after all.
The newer versions of Qt Creator are pretty fast and the auto-generated code from integration of Qt Designer into Qt Creator can be helpful. I generally like to code my own UI with Qt and avoid Qt Designer altogether, but I’m still playing with it once in a while.
I haven’t toyed much with the VS Add-in yet since Qt Creator is simpler to use for a casual coder such as myself.
Interesting that you’ve heard of us over in Japan! We’re always interested in new opportunities. 🙂 I just did a little work over there this summer for my research with Oregon State Univ as a tsunami-related collaboration with BRI. Small world.
Awesome tutorial, very concise and well written! I just built from scratch with MSVC2010 in the Visual Studio x64 Command Prompt and it generated the proper qmake for x64 development (as you pointed out Pavel, no adjustments to the tutorial are needed). If I had read the prereqs a little closer I would have gotten it on the first try.
I had tried this with the binaries from Qt and could not set my x64 compiler in this way because I did not have the proper qmake (and thus Qt greys out the x64 toolchain in the projects tab). Can you give me some suggestions as to why this was happening? I guess I don’t know much about the difference in the qmake files for x64 and win32 compilers. My computer config was the same before I built and when I tried this last (I had installed all the build prereqs before this). Thanks.
I’ve noticed that Qt Creator saves its Qt4 settings separate from its installation so that you can share your toolchains between multiple QtC installations. There might be some sort of corruption between versions. More likely, though, one of the links in your toolchain is broken.
Note that this is the exact same directory where I built my 64bit version of Qt—I’ve never moved it.
Second, make sure you create a new toolchain under Tools->Options->Qt4 rather than editing an existing one to prevent corruption. Click down the Details and make sure you click [Build All] to construct your toolchain. If you’ve already done that, make sure it’s pointing to the correct directory and using the “Microsoft Visual C++ Compiler 10.0” (or whatever version you have installed).
Third, I deleted all of my *.pro.user files for the projects that I wanted to build in 64bit and recreated the build configurations, just to make sure that I had clean projects going. I doubt this is your problem since it won’t even enable your toolchain, but you never know.
PS—Pavel, I linked your site from Nokia’s wiki and overhauled their instructions since their 64bit compilation instructions were laughable. You might see a traffic boost.
Thank you for your valuable advises and for spreading the word!
Nokia’s wiki is a top referrer to the page for the last 7 days.
“qhelpgenerator.exe cannot be opened”… and the compiling stopped. Someone got an idea whats the matter about that?
It seems something wrong with your PATH – check 5th step in tutorial.
BTW, try to compile latest version of Qt 4.7.4 – no reason to use old one 4.7.1.
I had an issue where the build failed in the middle on my 64 Bit Windows 7 Pro Laptop using Developer Studion 2010 Pro. I can’t remember the exact error but it seems similar to this one. Running the command prompt as an administrator solved the issue.
Also to clarify, I was building the 32 bit version using the x86 command prompt.
Jom is ok, but you can just use the -mp switch with nmake.
Just open up a Visual Studio x64 command prompt and run the batch file. This also builds the docs, the editbin command fixes a stack overflow that none of the developers seem to care about because it only shows up in 64-bit windows. The nmake install copies the header files over instead of dummy files to the qt-git directory, and the clean gets rid of the temporary files. This builds a nice copy of Qt that you can move from computer to computer, albeit pretty large.
Our development environment requires x64 because of our large datasets, and I’m already using functions that were introduced in 4.8.0. This will have to do until the people at the qt-msvc-installer google code page upload 4.8.x version of their installer.
@Evon: The Qt Creator which you download from the Nokia website has Qt built statically. Check the ‘about’ section and you’ll see it may be using a different version.
The whole process takes about 2 hours with an i7, no jom necessary.
Thanks for great info and for sharing your script!
I’ve added link to you comment on the page.
Just to note – Qt compiled by my instructions can be moved from one computer to another without any problems too.
Webpage of qt-msvc-installer says about Visual Studio 2008 support only. As for docs – I use online help – it is always up to date and broadband is spoiling :-).
what do you mean exactly by “moved from one computer to another”. Can you put it on any hard drive in any directory and use it in QtCreator by adding it manually? Because that doesn’t work for me, as the different paths to bin, lib, etc.. seem to be hardcoded once you compile.
This will instruct qmake to search for libs, includes etc. in the directory one level up so instead of the path that gets hardcoded into qmake at compilation it will then use the relative one specified by qt.conf. This makes it possible to move it to wherever you want.
This is not very well documented and it took me a long time to figure it out so I thought it might be helpful for some people.
Sounds like a really slick workaround. I’m definitely going to give this a try!
Worked like a charm, even if I launched..\jom\jom.exe -j 4 having dual-core machine.
Pls help. For my compilation I used QMAKESPEC=win32-msvc2010, then configure -debug-and-release -opensource -platform win32-msvc2010.
I am on x64 machine, so I used Visual Studio x64 Win64 Command Prompt for whole process.
So the Qt is builded for x64 even if win32-msvc2010 was set? Because of the x64 command prompt? Or am I wrong? My orded was to develop x86 app onx64 system. Thanks.
You need x86-Qt to create x86 applications even using x64 operating system for development.
So, compile Qt in x86.
Yes, when you use x64 command prompt Qt is compiled to x64, despite win32-msvc2010 setting.
Yippee! It works. Thanks a lot for reply.
Visual Studio Command Prompt makes it x86, Visual Studio x64 Win64 Command Prompt (2010) makes it x64.
If I may, you probably should add a comment in the steps or just below about the fact that win32-msvc2010 is for both: 32 & 64 bit compiles.
Thanks a lot! Works great!
I’m a bit confused…. The ### files are ‘pure’ release versions and ###d. ‘pure’ debug versions? What are the difference with a ‘debug_and_release’ build?
On release mode I can compile my app but on debug mode I have a link error: cannot find QtOpenGLd4.dll.
If I look at my /bin folder I see there is a #4.dll / #4.lib / #4d.dll /4d.lib for every qt library except QtOpenGLd4.dll. (I have only the release version ) What is happen? Any idea?
For such a big project as QT the instructions give on their website are a joke, its too hard to get it running if you aren’t a experienced computer science guy.
So thank again for this help!
Do you know what might cause this issue? Also, since its still compiling, and most of it seems to be compiling correctly, do you know if might be a critical problem when I actually try to use the libraries?
It is not “error”, it is “warning”.
C4100 is not critical (otherwise it would be reported as “error”), it just means there is global variable defined but not used.
I would appreciate it if you put the description of the -j parameter inline with the instructions.
I followed the directions to a “T” and having problems with the last stage of building. Everything compiled okay though but the build stopped.
Every time I run the,”..\jom\jom.exe -j 5″, It stops in a different area. If I run it again, it will pass this error and have another manifest issue.
I even tried to open the VC CMD window in