mercredi 26 août 2020

QT moc.exe won't compile in VS19 extension

I've been working on a project for months now and it's been fine. I've just came back from holiday and now it won't compile. Original it said this error message, which I have no clue what it's pointing out?enter image description here I restarted Visual studio and now get this:enter image description here With this log output:

1>main.cpp
1>D:\Documents\GitHub\CppTSPAlgorithm3\CppTSPalgorithm\CppTSPalgorithm.cpp(14,59): warning C4311: 
'type cast': pointer truncation from 'int (__cdecl *)(void)' to 'int'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility(4607,45): error C2675: unary '++': '_OutIt' does not define this operator or a conversion to a type acceptable to the predefined operator
1>        with
1>        [
1>            _OutIt=std::vector<double,std::allocator<double>>
1>        ] (compiling source file CppTSPalgorithm.cpp)
1>D:\Documents\GitHub\CppTSPAlgorithm3\CppTSPalgorithm\CppTSPalgorithm.cpp(123): message : see reference to function template instantiation '_OutIt std::fill_n<std::vector<double,std::allocator<double>>,int,int>(_OutIt,const _Diff,const _Ty &)' being compiled
1>        with
1>        [
1>            _OutIt=std::vector<double,std::allocator<double>>,
1>            _Diff=int,
1>            _Ty=int
1>        ]
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility(4608,13): error C2100: illegal indirection (compiling source file CppTSPalgorithm.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility(4607,45): error C2088: '++': illegal for class (compiling source file CppTSPalgorithm.cpp)
1>Done building project "CppTSPalgorithm.vcxproj" -- FAILED.

The moc.exe is in the right folder and hasn't been changed since installing QT. I have all the necessary extensions and have achieved a compilable solution. I'm using QT5 V5.15.0 on VS2019 x86. From what I've read QT creator and VS will have 2 different compilers and I've found no solution for this error on VS. I've also not been able to re-download/troubleshoot the moc.exe file.

Maybe useful links(I have no clue what's causing this and what to google, but this is what I've gotten): https://developercommunity.visualstudio.com/content/problem/580465/qt-moc-starts-over.html https://forum.qt.io/topic/54395/qt-5-4-1-cannot-find-moc-exe/4

Aucun commentaire:

Enregistrer un commentaire