Integrate Google Protocol Buffers .proto files to Visual C++ 2010

前端 未结 2 953
梦谈多话
梦谈多话 2020-12-31 07:07

I\'ve added a custom build step to my Visual Studio project files which generates the google protobuf .h/.cc files from th

2条回答
  •  说谎
    说谎 (楼主)
    2020-12-31 07:34

    Maybe this helps. Especially look at the post of Igor Zavoychinskiy:

    Solution of this nasty problem is actually simple: in outputs sections you should specify full path(s). This isn't explicitly stated anywhere but without this checker just fails to find the files and, hence, assumes they don't exist. For example for protobuffers compiling outputs section will be like this:

    $(InputDir)\$(InputName).pb.cc;$(InputDir)\$(InputName).pb.h

    and (maybe?) kmote00:

    ... Bottom line: I just had to make sure my "Outputs" entry exactly matched the Default Value in the (user-defined) "OutputFile" property. (Thankfully this also obviated the need for a two-pass build, which was another annoyance I had previously put up with.)

提交回复
热议问题