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

Fix build error 'ambiguous symbol' on windows #28949

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

Conversation

GkvJwa
Copy link
Contributor

@GkvJwa GkvJwa commented Feb 12, 2025

If use a local namespace, the following build error will occur on windows

31>C:\tdesktop\Telegram\SourceFiles\settings\settings_calls.cpp(415,30): error C2872: 'Platform': ambiguous symbol
31>(compiling source file '../../Telegram/SourceFiles/settings/settings_calls.cpp')
31>    C:\tdesktop\Telegram\SourceFiles\calls\calls_instance.h(16,11):
31>    could be 'Platform'
31>    C:\tdesktop\Telegram\lib_webrtc\webrtc\webrtc_environment.h(15,11):
31>    or       'Webrtc::Platform'
31>C:\tdesktop\Telegram\SourceFiles\settings\settings_calls.cpp(417,39): error C2872: 'Platform': ambiguous symbol
31>(compiling source file '../../Telegram/SourceFiles/settings/settings_calls.cpp')
31>    C:\tdesktop\Telegram\SourceFiles\calls\calls_instance.h(16,11):
31>    could be 'Platform'
31>    C:\tdesktop\Telegram\lib_webrtc\webrtc\webrtc_environment.h(15,11):
31>    or       'Webrtc::Platform'
31>C:\tdesktop\Telegram\SourceFiles\settings\settings_calls.cpp(426,62): error C2872: 'Platform': ambiguous symbol
31>(compiling source file '../../Telegram/SourceFiles/settings/settings_calls.cpp')
31>    C:\tdesktop\Telegram\SourceFiles\calls\calls_instance.h(16,11):
31>    could be 'Platform'
31>    C:\tdesktop\Telegram\lib_webrtc\webrtc\webrtc_environment.h(15,11):
31>    or       'Webrtc::Platform'
31>settings_main.cpp

Of course, a better way is to declare it directly at the beginning

using namespace ::Platform;
using namespace Webrtc;

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.

1 participant