-
Notifications
You must be signed in to change notification settings - Fork 37
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
Multiply defined functions at link time due to omission of inline
#101
Comments
Could it be that you included tinybvh with TINYBVH_IMPLEMENTATION defined in several files? You should include it with that define active only in one c/cpp. |
No, the functions my patch changes are not in the implementation section guarded by |
Oh I see what's going on. I specifically setup an example to test inclusion in multiple files, but that test also overrides the math classes... I am going to apply your patch, thanks. :) |
In fact, could you submit this as a PR in the dev branch? |
Will do sure! |
The proposed fix:
inline_functions.patch
Mark all functions
inline
1. Corrects multiply defined symbol linker errors when
including tiny_bvh.h in more than one CPP file.
2. Replace
static inline
with justinline
for thefunctions declared that way, since
static
has nosemantic meaning with
inline
also declared.Would you like me to open a pull request for this? Thanks!
The text was updated successfully, but these errors were encountered: