0

I am using boost (which uses time.h) and a C library(libav) that has a header file that is also called time.h. So when boost tries to use time.h it's calling the time.h from libav as apposed the ANSI C standard time.h.

How do I force libav to find it's own time.h and boost to use the ANSI C standard time.h? And I don't want to modify the libraries at all as this code needs to build everywhere.

Thanks!

1
  • 1
    In order to help we must see the code through which you are including them. Otherwise we can only guess. Commented Mar 2, 2013 at 20:37

1 Answer 1

3

time.h from libav should not conflict with time.h from /usr/include as it included in libav sources as:

#include "libavutil/time.h" 

At least it included this way in latest version of libav from git repository. If you have older version, that does not do that, you should probably upgrade. If you set libavutil directory in include path by mistake, you should remove that (or change to path that does not include dir libavutil itself).

Sign up to request clarification or add additional context in comments.

4 Comments

Only that "system includes" should use <...>
That include statements with "" are from libav sources, not my suggestion
They are referencing their own headers, presumably. he algorithm is that "..." starts looking for the file in the same directory where the source is before looking at the system include directories, while <...> only looks at the system include directories.
@vonbrand question is "How do I force libav to find it's own time.h" and unrelated to what way question's author should include that headers, neither I suggested it that way. I do not understand purpose of your comment.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.