[Libav-user] Problems with time.h in ffmpeg util libary

Hannes Wuerfel hannes.wuerfel at student.hpi.uni-potsdam.de
Fri Nov 23 03:09:53 CET 2012


Ah, perhaps my fault giving you compile errors in german.
I don't think that you've understood me right.
My problem is simple. I'd like to use ffmpeg in a project with some more 
lib dependencies, for example opencv, cuda libs qt, open scenegraph or 
whatever.
I've also wrote a simple start stop timer class for time measurement 
that is using the c++ #include for time.h which is <ctime>.

Combining them all together causes name conflicts. The same happened to 
me in earlier day of SDL which also (in my opinion) made the mistake to 
name a file time.h.
Well for my simple start stop timer it's fine, i could write platform 
dependent code but using time.h is common I think.
I was wondering if anybody stumbled upon this issue and can provide me a 
workaround or can guide me in the right direction if I'm doing something 
wrong.

My situation now is that I'm unable to use libavutil with opencv, osg or 
my timer class.
The only thing I found on the web was an osg contributor who discovered 
the same problem:

http://forum.openscenegraph.org/viewtopic.php?t=11190
"FindFFmpeg.cmake has been changed in order to support the new header 
include format for FFmpeg. In the 1.0 release, a new file had been added 
with the name “time.h” in the avutil library. The previous method of 
adding includes caused conflicts with the ANSI C “time.h” file. Now the 
include directive will only use the main include folder. All files using 
the old include format have been updated to reflect the change."

Many thanks in advance
Hannes


More information about the Libav-user mailing list