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

Internals: fix ambiguous symbol #8184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

zMidair
Copy link

@zMidair zMidair commented Nov 27, 2024

I keep getting this error and this commit will most probably fix it.

Hopefully everything is alright, otherwise please give constructive criticism.

@ocornut
Copy link
Owner

ocornut commented Nov 28, 2024

I keep getting this error

Please specify which error, on which line, which compiler, setup etc.

@zMidair
Copy link
Author

zMidair commented Nov 28, 2024

The error is basically what I said. The reason it exists is because another library I use (unrelated to imgui) conflicts with the cmath log function used by imgui. This would be a good fix for multiple users since the “log” function name is pretty common.

@ocornut
Copy link
Owner

ocornut commented Nov 28, 2024

Please answer my question clearly. You haven’t done that.

@ocornut
Copy link
Owner

ocornut commented Nov 29, 2024

AFAIK the only place we call/use a symbol called log is there:

static inline double ImLog(double x)            { return log(x); }

for this to make a difference you would need to have included imgui_internal.h in the same compilation unit as another library.
Can you check/verify if changing the code to:

static inline double ImLog(double x)            { return ::log(x); }

Fixes your issue?

But either way, I need you to report exact errors + clarify your repro (e.g. confirm that you are including header xxx - which library? - before imgui_internal.h, or whatever you are doing). Thank you.

It's particularly difficult to blindly accept a change without details, and if the message says "will most probably fix it" it doesn't give confidence either.

@zMidair
Copy link
Author

zMidair commented Nov 29, 2024

Alright, I'll try doing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants