liblinphone
liblinphone copied to clipboard
[Improvement] Liblinphone intersects with other libraries with "time.h" inside
Context
Hi! I'm on my way to implement Linphone SDK into my React-Native Expo application. Me and my team are working on React-Native plugin for the SDK to make the SDK available for cross-platform mobile developers. The implementation is going well but I faced an issue with time.h
file include in c-participant-device.h and c-participant.h files. These files includes the standard "time" C library.
The issue
React-Native apps are provided with Folly library. The library is usually installed via CocoaPods (but it doesn't really matter). It contains a file named Time.h under folly/portability
directory.
When I try to use Linhpone SDK in my iOS application it tries to resolve #include "time.h"
in files above. As a result it imports not the standard library but the "Time.h" file from Folly library.
How to fix the issue
I have a solution for the issue. As liblinphone
dependent on standard time
library - please change the #include
syntax from
#inlcude "time.h"
to
#inlcude <time.h>
With the change above the libliphone
library will no longer intersect with any other libraries with "time.h"
file inside.