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. Qt Creator error : --proto_path
Forum Updated to NodeBB v4.3 + New Features

Qt Creator error : --proto_path

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 4 Posters 2.6k Views 1 Watching
  • 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    You have to provide more context.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • T Offline
      T Offline
      theKid
      wrote on last edited by
      #3

      Trying to make a project with the Mingw32 toolkit and when I tried to build it with Qtcreator I get the following error message

      ../../ostinato/common/protocol.proto: File does not reside within any path specified using --proto_path (or -I).  You must specify a --proto_path which encompasses this file.  Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
      
      aha_1980A 1 Reply Last reply
      0
      • T theKid

        Trying to make a project with the Mingw32 toolkit and when I tried to build it with Qtcreator I get the following error message

        ../../ostinato/common/protocol.proto: File does not reside within any path specified using --proto_path (or -I).  You must specify a --proto_path which encompasses this file.  Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
        
        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @theKid Please provide a full build log when you do a rebuild (as text please!). Thanks

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • T Offline
          T Offline
          theKid
          wrote on last edited by
          #5

          I'm not sure as to what it needs or to edit. This is an OsP and the original developer doesn't use Qtcreator so they are unfamiliar with how to solve it

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Again: please provide more context.

            What project is that ?
            What OS are you working on ?
            What version of Qt are you using ?
            What version of Qt Creator are you using ?
            What version of protobuf are you using ?
            etc.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • mranger90M Offline
              mranger90M Offline
              mranger90
              wrote on last edited by
              #7

              It sounds to me like you are trying to compile a Google Protocol Buffer file.
              This can be done using the Qt pro file with an extra compiler options.
              For example in your project file add something like this:

              PROTOC_DIR = "C:\protoc-3.6.1-win32\bin"
              PROTOS_DIR = $$PWD
              PROTOS = AxisMessage.proto
              
              message ("Protobuf Compiler for $${PROTOS}")
              gprotoc.name = protobuf_headers
              gprotoc.target = $$PWD/AxisMessage.pb.cc
              gprotoc.depends = FORCE
              gprotoc.variable_out = SOURCES
              gprotoc.commands = $$PROTOC_DIR\protoc --cpp_out=$$PWD --proto_path=$$PWD $$PROTOS
              gprotoc.CONFIG += no_link target_predeps
              
              PRE_TARGETDEPS = $$PWD/AxisMessage.pb.cc
              QMAKE_EXTRA_TARGETS += gprotoc
              
              

              If this is a CMAKE project, then I'm not sure what you do.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                theKid
                wrote on last edited by
                #8

                Project: Ostinato
                OS: Windows 10
                Qt: 5.11.2 MinGW 32
                Qt Creator: 4.7.2
                protobuf: 3.6.1 --- This may be a problem ---
                Winpcap : 4.1.2

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  theKid
                  wrote on last edited by
                  #9
                  19:39:50: Running steps for project ost...
                  19:39:50: Configuration unchanged, skipping qmake step.
                  19:39:50: Starting: "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" 
                  cd common/ && ( test -e Makefile.ostproto || C:/Qt/5.11.2/mingw53_32/bin/qmake.exe -o Makefile.ostproto C:/Users/littl/Desktop/IntroSWE/Test/ostinato/common/ostproto.pro -spec win32-g++ CONFIG+=debug CONFIG+=qml_debug ) && C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.ostproto 
                  mingw32-make[1]: Entering directory 'C:/Users/littl/Desktop/IntroSWE/Test/build-ost-Desktop_Qt_5_11_2_MinGW_32bit-Debug/common'
                  C:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.ostproto.Debug
                  mingw32-make[2]: Entering directory 'C:/Users/littl/Desktop/IntroSWE/Test/build-ost-Desktop_Qt_5_11_2_MinGW_32bit-Debug/common'
                  protoc --cpp_out=. --proto_path=. ../../ostinato/common/protocol.proto
                  ../../ostinato/common/protocol.proto: File does not reside within any path specified using --proto_path (or -I).  You must specify a --proto_path which encompasses this file.  Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).
                  Makefile.ostproto.Debug:281: recipe for target 'protocol.pb.h' failed
                  mingw32-make[2]: Leaving directory 'C:/Users/littl/Desktop/IntroSWE/Test/build-ost-Desktop_Qt_5_11_2_MinGW_32bit-Debug/common'
                  Makefile.ostproto:36: recipe for target 'debug' failed
                  mingw32-make[1]: Leaving directory 'C:/Users/littl/Desktop/IntroSWE/Test/build-ost-Desktop_Qt_5_11_2_MinGW_32bit-Debug/common'
                  Makefile:99: recipe for target 'sub-common-ostproto-pro-make_first' failed
                  mingw32-make[2]: *** [protocol.pb.h] Error 1
                  mingw32-make[1]: *** [debug] Error 2
                  mingw32-make: *** [sub-common-ostproto-pro-make_first] Error 2
                  19:40:00: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" exited with code 2.
                  Error while building/deploying project ost (kit: Desktop Qt 5.11.2 MinGW 32bit)
                  When executing step "Make"
                  19:40:01: Elapsed time: 00:11.
                  
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Try replacing the . by $$PWD in the protobuff pri file.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • T Offline
                      T Offline
                      theKid
                      wrote on last edited by
                      #11

                      will try, thank you

                      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