Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Compiling Qt Creator with Visual Studio (Cmake build), Error LNK1104 (file: cmake_pch.obj)
Forum Updated to NodeBB v4.3 + New Features

Compiling Qt Creator with Visual Studio (Cmake build), Error LNK1104 (file: cmake_pch.obj)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gertio
    wrote on last edited by Gertio
    #1

    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/qtcreatorcdbext

    So 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_DIR

    Do I need any of these?

    jsulmJ 1 Reply Last reply
    0
    • G 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/qtcreatorcdbext

      So 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_DIR

      Do I need any of these?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Gertio
        wrote on last edited by Gertio
        #3

        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 error

        Error LNK1104 cannot open file 'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj'

        even though QtCreatorPchConsole compiles fine.

        jsulmJ 1 Reply Last reply
        0
        • G 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 error

          Error LNK1104 cannot open file 'C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug\cmake_pch.obj'

          even though QtCreatorPchConsole compiles fine.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gertio
            wrote on last edited by Gertio
            #5

            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.pch

            put them into
            C:\Qtdev\QtCreatorBld\src\libs\3rdparty\syntax-highlighting\QtCreatorPchConsole.dir\Debug

            and 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

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Gertio
              wrote on last edited by
              #6

              Well, still cant really compile stuff... this cmake_pch.obj error is popping up all over the place.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                Gertio
                wrote on last edited by Gertio
                #7

                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.obj

                when compiling
                ClangFormat
                clangpchmanagerbackend
                clangrefactoringbackend

                Note 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 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved