0

I begin to learn qt one month ago. I want to compile a static library for qt. I follow the following instructions:

1: download the latest qt source code

2: configure -static -platform win32-msvc2013 -nomake tests -nomake tools -no-sql-sqlite

3: nmake

step1 and step 2 work well. After more than one hour running nmake, I come to some error as below.

I have search the www for answers, even though many people have questions similar to mime, none solve my problem. Hope someone can help me.

Qt 5.7.0; Qt Creator 4.1.0; win7 64; vs2013

mimetypemodel.cpp
.\mimetypemodel.cpp(74) : error C2440: '<function-style-cast>' : cannot convert from 'initializer-list' to 'QStringList'.
NMAKE: fatal error U1077: ""D:\program Files(x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"" : return code "0x2"
Stop
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
noodles guo
  • 459
  • 4
  • 11
  • 1. Apply all service packs and updates to your Visual Studio. The initial release of MSVC 2013 had bugs that wouldn't let some valid code compile. This might be one of those. 2. To speed things up, use `jom -j` instead of nmake. It'll be much faster: it's a parallel nmake. It's included with Qt Creator, you can also download it from Qt downloads. – Kuba hasn't forgotten Monica Nov 16 '16 at 02:00
  • thanks. I will try your advise. Can I directly replace the nmake with jom -j command after I install the jom? – noodles guo Nov 16 '16 at 02:55
  • Yes, you can! It works great. – Kuba hasn't forgotten Monica Nov 16 '16 at 02:58
  • I install the vs2013 update5, too large. And now jom works. And jom is really wonderful :) . Do you know what the -prefix means, I don't add that when configure, is that necessary ? – noodles guo Nov 16 '16 at 09:24
  • The `-prefix` is used when you have separate build and install folders for Qt. – Kuba hasn't forgotten Monica Nov 16 '16 at 13:15
  • thank you so so much. I still have two problem here:1: I use prefix and use jom -j install after jom -j, and I want to know if I don't add -prefix, do I still need jom -j install. what is the different of jom -j install and jom -j , can one replace another. 2: I encounter a warning when I add the qt version: qmlscence not installed. is that ok? I know my problem is a bit much, thank you again! – noodles guo Nov 16 '16 at 13:56
  • I'm not sure but try this: [error-c2440](https://stackoverflow.com/questions/37204166/error-c2440-default-argument-cannot-convert-from-const-wchar-t-1-to-bst) – saqef Aug 02 '17 at 15:31

0 Answers0