-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#3523: Using relative path for #include #3525
Conversation
I'm not sure that's correct, and it's very likely to break the compilation of existing external stuff out there. Our Makefile installs headers to something like In the Janus NDI plugin, for instance, we define CFLAGS like this:
and then the plugin includes the
and it works. |
That said, I tried your patch with the NDI plugin and it still works, so I may be wrong about the potential impact. |
It shouldn't break anything because you are giving a clear indication to the processor about the location of the header relative to the position of the current file. I don't really like using |
Besides, there are already similar things in your own code: https://github.com/meetecho/janus-gateway/blob/master/src/events/eventhandler.h#L100 So it just brings everything to a common approach. |
I get that, but that's what many are using, so I can't just ignore that, and if it could break things for people out there. |
You don't need ignore that, please take a look at my second previous message. You're already using a relative path in other header files:
Especially the second one. Logging is used by all plugins and it includes utils using a relative path. If logging doesn't break anything for anyone, then the relative paths for refcount won't break either, because they are at the same depth and belong to the previous directory. You've seen for yourself that your plugin works and it doesn't break the build. In fact, if using the -I option is the only way to compile an external plugin, then you really won't break anything. |
Makes sense. Merging then, thanks! |
Thank you! |
Following #3523