Compiling Qt4 HEAD with MSVC 2015 - cstdint errors
-
wrote on 17 Jul 2015, 08:20 last edited by JulienMaille
Hi everyone,
I'm trying to compile QT4 on windows using Microsoft Visual 2015 (I recently upgraded from 2005).A lot of stuff do compile just fine but JavascriptCore fails with errors related to standard type:
pcre_compile.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): erro
r C2039: 'int_least8_t': is not a member of 'global namespace'' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): erro r C2873: 'int_least8_t': symbol cannot be used in a using-declaration C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): erro r C2039: 'int_least16_t': is not a member of '
global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(23): erro
r C2873: 'int_least16_t': symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(24): erro
r C2039: 'int_least32_t': is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\cstdint(24): erro
r C2873: 'int_least32_t': symbol cannot be used in a using-declarationWhat could I do to fix that?
-
wrote on 18 Jul 2015, 20:12 last edited by JulienMaille
Nobody is testing msvc2015?
-
wrote on 22 Jul 2015, 12:28 last edited by
I have exactly the same problem
I googled a bit, and one possibility is that there are conflicts between the file names in the JavascriptCore directory and the system libraries (see http://www.gamedev.net/topic/539607-boost-clock_t--is-not-a-member-of-global-namespace/ and http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70414 )
Assuming that's problem, I have tried removing the os-win32 directory from src\3rdparty\javascriptcore\JavaScriptCore (that directory should contain the problematic files). That way the compilation goes on a bit further, but I get other errors of that kind later on.
I'm still working on it :/ -
wrote on 23 Jul 2015, 10:07 last edited by Deneb
Hi, you can try to use this unofficial patch: https://fami.codefreak.ru/mirrors/qt/unofficial_builds/qt4.8.7-msvc2015/02-fix_build_with_msvc2015-45e8f4ee.diff . This is a quick and ugly fix, but it works for me.
-
wrote on 29 Jul 2015, 11:15 last edited by
Thanks, it works for me as well
-
wrote on 17 Sept 2015, 11:03 last edited by
Can you guys recommend a simple tool to apply diff on windows?
-
Yes, here it is :-)
http://gnuwin32.sourceforge.net/packages/patch.htm -
wrote on 17 Sept 2015, 11:39 last edited by
Thank you
Are these patches still required to build Qt4 on MSVC 2015?
-
wrote on 17 Sept 2015, 16:53 last edited by
Ok I get no errors when applying these patches.
However QtWebkit is not compiled! Anyone has the same issue? -
wrote on 26 Sept 2015, 14:28 last edited by
It seems that QtWebkit is not enabled by default in MSVC2013+. You can try run configure.exe with -webkit option. It works for me.
-
Hi, you can try to use this unofficial patch: https://fami.codefreak.ru/mirrors/qt/unofficial_builds/qt4.8.7-msvc2015/02-fix_build_with_msvc2015-45e8f4ee.diff . This is a quick and ugly fix, but it works for me.
wrote on 24 Apr 2016, 17:10 last edited byThis post is deleted! -
Can you guys recommend a simple tool to apply diff on windows?
wrote on 19 Jul 2016, 19:25 last edited bySo I'm sure you've figured out the problem already by now, but I thought I'd add this info here for anyone browsing the web looking to compile qt4 with Visual Studio 2015 like I was. I use a python tool called python-patch 1.16 to apply diffs on Windows. If you have python installed, just run this to install (note, I'm using python 2.7, but it should work on python 3):
pip install patch python -m patch
Then, navigate to the site-packages directory (eg: C:\Python27\lib\site-packages\ ) and find patch.py copy this file to the qt root directory (eg: C:\qt\qt4.8.7) then on the command line run:
patch.py 02-fix_build_with_msvc2015-45e8f4ee.diff
(Assuming you kept the name of the patch for qt4 referenced by Deneb here: https://fami.codefreak.ru/mirrors/qt/unofficial_builds/qt4.8.7-msvc2015/02-fix_build_with_msvc2015-45e8f4ee.diff named the same).
You can then delete the diff and patch.py files from the qt directory and compile.
-
I have exactly the same problem
I googled a bit, and one possibility is that there are conflicts between the file names in the JavascriptCore directory and the system libraries (see http://www.gamedev.net/topic/539607-boost-clock_t--is-not-a-member-of-global-namespace/ and http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70414 )
Assuming that's problem, I have tried removing the os-win32 directory from src\3rdparty\javascriptcore\JavaScriptCore (that directory should contain the problematic files). That way the compilation goes on a bit further, but I get other errors of that kind later on.
I'm still working on it :/wrote on 23 Aug 2019, 08:20 last edited by Altenburger@brembo said in Compiling Qt4 HEAD with MSVC 2015 - cstdint errors:
I have exactly the same problem
I googled a bit, and one possibility is that there are conflicts between the file names in the JavascriptCore directory and the system libraries (see http://www.gamedev.net/topic/539607-boost-clock_t--is-not-a-member-of-global-namespace https://essays.agency/homework-help.html and http://www.ogre3d.org/forums/viewtopic.php?f=2&t=70414 )
Assuming that's problem, I have tried removing the os-win32 directory from src\3rdparty\javascriptcore\JavaScriptCore (that directory should contain the problematic files). That way the compilation goes on a bit further, but I get other errors of that kind later on.
I'm still working on it :/Hello,
In my case there was a conflict of two *.h files with the same names.
Now I'm trying to build Qt 4.8.7 with Visual Studio 2017. Here's the patch - https://github.com/sandym/qt-patches/tree/master/windows/qt-4.8.7 -
So I'm sure you've figured out the problem already by now, but I thought I'd add this info here for anyone browsing the web looking to compile qt4 with Visual Studio 2015 like I was. I use a python tool called python-patch 1.16 to apply diffs on Windows. If you have python installed, just run this to install (note, I'm using python 2.7, but it should work on python 3):
pip install patch python -m patch
Then, navigate to the site-packages directory (eg: C:\Python27\lib\site-packages\ ) and find patch.py copy this file to the qt root directory (eg: C:\qt\qt4.8.7) then on the command line run:
patch.py 02-fix_build_with_msvc2015-45e8f4ee.diff
(Assuming you kept the name of the patch for qt4 referenced by Deneb here: https://fami.codefreak.ru/mirrors/qt/unofficial_builds/qt4.8.7-msvc2015/02-fix_build_with_msvc2015-45e8f4ee.diff named the same).
You can then delete the diff and patch.py files from the qt directory and compile.
wrote on 7 Apr 2020, 01:36 last edited by@DarthFutuza reeally save my life . love you <3
-
This post is deleted!