Compiling Qt Creator with Visual Studio (Cmake build), Error LNK1104 (file: cmake_pch.obj)
-
wrote on 23 Jun 2020, 07:18 last edited by Gertio
I am trying to build a Visual Studio solution for Qt Creator with Cmake. I have cloned the repo and checked out the tag 4.12.3.
I have Qt and llvm and Perl as the description says, but when trying to configure with Cmake I get an error:CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
DbgEngLib
linked by target "qtcreatorcdbext" in directory C:/Qtdev/QtCreatorSrc/src/libs/qtcreatorcdbextSo there is an option (type: Path) "DbgEngLib" but it is not found, What is this DbgEngLib? I could not find anything in the description about it. There are also few other Path options which are shown as not found in CMake:
ELFUTILS_LIB_eu_compat
yaml-cpp_DIR
Qt6_DIRDo I need any of these?
-
I am trying to build a Visual Studio solution for Qt Creator with Cmake. I have cloned the repo and checked out the tag 4.12.3.
I have Qt and llvm and Perl as the description says, but when trying to configure with Cmake I get an error:CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
DbgEngLib
linked by target "qtcreatorcdbext" in directory C:/Qtdev/QtCreatorSrc/src/libs/qtcreatorcdbextSo there is an option (type: Path) "DbgEngLib" but it is not found, What is this DbgEngLib? I could not find anything in the description about it. There are also few other Path options which are shown as not found in CMake:
ELFUTILS_LIB_eu_compat
yaml-cpp_DIR
Qt6_DIRDo I need any of these?
@Gertio said in Building Qt Creator with CMake (DbgEngLib?):
What is this DbgEngLib?
Google says http://codemonkeyintest.blogspot.com/2011/06/dbgenglib-part-1-checking-for-debug.html
-
wrote on 23 Jun 2020, 10:18 last edited by Gertio
ah thanks, I got it working following the link you posted.
Cmake configured successfully. But now I have another issue, when trying to compile Utils I get the errorError LNK1104 cannot open file 'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj'
even though QtCreatorPchConsole compiles fine.
-
ah thanks, I got it working following the link you posted.
Cmake configured successfully. But now I have another issue, when trying to compile Utils I get the errorError LNK1104 cannot open file 'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj'
even though QtCreatorPchConsole compiles fine.
@Gertio said in Building Qt Creator with CMake (DbgEngLib?):
C:\lyx\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj
Does this file exist?
-
wrote on 23 Jun 2020, 10:25 last edited by Gertio
no.
The error is the same with Sqlite...
With Utils I had success to grab the files:
C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\CMakeFiles\QtCreatorPchConsole.dir\cmake_pch.cxx.obj and
C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\CMakeFiles\QtCreatorPchConsole.dir\cmake_pch.cxx.pchput them into
C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debugand remove the ".cxx" part so they become what is missing in the error.
As for Sqlite, there are also cmake_pch.c.pch and cmake_pch.c.obj in C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\CMakeFiles\QtCreatorPchConsole.dir
so doing same as above with these works for sqlite.Edit:
Actually for Utils its
'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchGui.dir\Debug\cmake_pch.obj'and for Sqlite its
'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj'got a little confused there
-
wrote on 23 Jun 2020, 10:38 last edited by
Well, still cant really compile stuff... this cmake_pch.obj error is popping up all over the place.
-
wrote on 23 Jun 2020, 10:54 last edited by Gertio
I also get a lot of these errors:
LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in mocs_compilation.obj
LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in mocs_compilation.objwhen compiling
ClangFormat
clangpchmanagerbackend
clangrefactoringbackendNote this is when I manually copy the cmake_pch.cxx.pch and cmake_pch.cxx.obj into the directory described above and rename them. Otherwise I get
Error LNK1104 cannot open file 'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchGui.dir\Debug\cmake_pch.obj'
1/7