Skip to content
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

[hio] Don't export stbimage functions for linkage with things that may also use stbimage. #1498

Merged
merged 1 commit into from
Apr 27, 2021

Conversation

marsupial
Copy link
Contributor

Description of Change(s)

Add pre-processor macros so stbimage functions aren't exported.

Fixes Issue(s)

When building/linking with other things that use stbimage, symbols can be defined multiple times.

@jtran56
Copy link

jtran56 commented Apr 20, 2021

Filed as internal issue #USD-6662

@sunyab
Copy link
Contributor

sunyab commented Apr 24, 2021

Hi @marsupial, this change caused one of our internal test builds on Linux in strict mode to fail. This was because gcc was emitting a bunch of "unused function" warnings now that the stb_* functions are marked static. I ended up adding a new pragma to arch/pragmas.h so that we could suppress those warnings in this file and get things working again.

Let me know if you feel we should solve this another way, otherwise this should land shortly. Thanks!

@marsupial
Copy link
Contributor Author

marsupial commented Apr 26, 2021

If I understand, you'll keep whats in this MR, but just surround it in a new #pragma unused macro ?
Sounds good and useful if so !

pixar-oss pushed a commit that referenced this pull request Apr 27, 2021
function warnings

See #1498

(Internal change: 2161720)
@pixar-oss pixar-oss merged commit 3942c87 into PixarAnimationStudios:dev Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants