can i adjust the location of the flatbuffer.h\package location ??

252 views
Skip to first unread message

yair mozes

unread,
Feb 4, 2015, 6:28:33 AM2/4/15
to flatb...@googlegroups.com
Hi ,
is it possible to add to the compiler an option to state the path to the flatbuffer location.
as it now all generated code gets include to flatbuffer/flatbuffer.h in c++ or import from com.google.flatbuffer.

i want to add this to an automated build system and put the flatbuffer.h \package in some general 3parties location so all generated codes will point to that location.

if this feature already exists  please update me as i didn't saw something similar yet  .(maybe i missed something  :) ) 

Wouter van Oortmerssen

unread,
Feb 4, 2015, 7:01:56 PM2/4/15
to yair mozes, flatb...@googlegroups.com
The location is already relative to the include directory specified in the cmake file. If you wish to store it in a thirdparty directory, you can simply set the include path to point there, without any changes in the code generated.

--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Plumer

unread,
Feb 28, 2017, 6:39:23 PM2/28/17
to FlatBuffers
I have the same issue. I am using a binary distribution of flatc.

 
Any of the following options would work but I cannot figure out how to do any of them:

(1) Use an argument to flatc to suppress generation of the line #include "flatbuffers/flatbuffers.h" - I can manually include it in my cpp file

(2) Use an argument to flatc to specify the full path to flatbuffers.h

(3) Change the generated code to use angle brackets (i.e. #include <flatbuffers/flatbuffers.h> ) so that the IDE can find it on the project-specified include path.




Wouter van Oortmerssen

unread,
Feb 28, 2017, 6:53:29 PM2/28/17
to Edward Plumer, FlatBuffers

I have the same issue. I am using a binary distribution of flatc.

What message is this in reference to? I do not appear to have the original email this responds to.

I am not sure I understand the problem. You typically add wherever FlatBuffers lives to your list of include directories. Under what exact circumstances (compiler / IDE / OS / project structure / ..) does it fail to find the header?

Other headers/cpp files in the project also rely on #include "flatbuffers/flatbuffers.h".. we probably don't want to change this. It is the most common way to refer to a project's own headers. These aren't system headers.
Reply all
Reply to author
Forward
0 new messages