-
Notifications
You must be signed in to change notification settings - Fork 168
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
Issues with includes #140
Comments
hi, your applications Makefile should include re.mk to get the same CFLAGS etc as re, https://github.com/creytiv/redemo/blob/master/Makefile#L15 it is recommended that the application only includes https://github.com/creytiv/redemo/blob/master/src/sip_ua/sip_ua.c#L21 the redefinition of types is only a fallback solution, in case inttypes.h is not available. either in your makefile or in your code:
Alfred |
Hi Alfred, thanks for the response, it helped a lot. With
I believe that definition is needed in MS compilers only when compiled as C, but it causes following issue when compiled as C++: zeromq/czmq#212. The guard |
Would you like to submit a Pull Request for that change (inline and C++) ? It would be great to test the change with different MS compilers. |
Created the pull request, I have tested it only on latest Visual Studio 2017 ( I do not have older versions at the moment), but from what I remember, we have used C++ inline keyword for years (even in Visual Studio 6 which is like from 1998), and it worked fine, and for C it now works like before. Also by the way, I mention it in the pull request comments, but the inline was not available for C because of poor C99 support, which is not the case anymore, so basically in new version you won't need the inline keywoard define at all, but it works with it as well. |
First of all, this library is great, I am using it to get familiar with RTP/RTCP protocols. During that, I have run into couple minor issues related to including re_* header files, so I thought it would be worth sharing:
The standard types
uint32_t
, etc, conflicts withstdint.h
, which does not seem to be reflected anywhere in the library. Perhaps adding something likeHAVE_STDINT_H
would help?.Again a bit related, for C++ code the
bool
,true
,false
andinline
keywords are all redefined, but that does not seem to be a good idea (and some compilers such as Visual Studio 2017 evaluate this as an error).(just a suggestion) The library relies heavily on importing just "re.h" (otherwise there are issues like missing include guards, etc), but since other includes are available as well, you can be sure people will include them. It might be worth considering either moving them out of API, or making them safe to include separately...
Apart from these I was able to use the library and it works well! (Well for now I have only simple RTP requirements, will be using it more thoroughly later).
The text was updated successfully, but these errors were encountered: