1

I'm working on the project with the a structure similar to the following:

root/inc/foo/bar/
root/src

I've just started to use Google Protocol Buffers and when I compile the code I found that I need add foo/bar/file.h to the file.cc file in order for the code to find the header. I don't plan to commit the .h and .cc files to the repo since they get automatically generated. Is there a parameter I can give protoc to seperate the header/source files into different directories and add the correct path to the source file #includes?

William Pursell
  • 204,365
  • 48
  • 270
  • 300
Lestat
  • 49
  • 1
  • 7

1 Answers1

1

Maybe you could append a script "mv foo.h foofolder/" after executing the protoc

jayatubi
  • 1,972
  • 1
  • 21
  • 51
  • Indeed this was the solution for me. Additionally, if the script containing these commands(`protoc source ... `and `mv source target `) are named with a .bat extension, it will be runnable from both Linux and Windows, because the move commands are the same thanks to the Linux subsystem in windows. Given, the corresponding protoc lib is installed correctly under those systems. – Dávid Tóth Sep 20 '19 at 12:42