I need my application to work where Urho3D networking does not (the web). I built a websocket client and when I try to include both Urho3D and OpenSSL I get:
In file included from /usr/include/openssl/engine.h:24,
from …/include/boost/asio/ssl/detail/openssl_types.hpp:26,
from …/include/boost/asio/ssl/context_base.hpp:19,
from …/include/boost/asio/ssl/context.hpp:23,
from …/include/boost/asio/ssl/stream.hpp:26,
from …/include/boost/beast/websocket/ssl.hpp:16,
from …/include/boost/beast/ssl/ssl_stream.hpp:16,
from …/include/boost/beast/ssl.hpp:15,
from include/websocket.hpp:111,
from login.hpp:10,
from main.cpp:1:
/usr/include/openssl/ui.h:42:1: error: reference to ‘UI’ is ambiguous
42 | UI *UI_new(void);
/usr/local/include/Urho3D/UI/UI.h:60:18: note: candidates are: ‘class Urho3D::UI’
60 | class URHO3D_API UI : public Object
In file included from /usr/include/openssl/crypto.h:25,
from /usr/include/openssl/bio.h:20,
from /usr/include/openssl/conf.h:13,
from …/include/boost/asio/ssl/detail/openssl_types.hpp:23,
from …/include/boost/asio/ssl/context_base.hpp:19,
from …/include/boost/asio/ssl/context.hpp:23,
from …/include/boost/asio/ssl/stream.hpp:26,
from …/include/boost/beast/websocket/ssl.hpp:16,
from …/include/boost/beast/ssl/ssl_stream.hpp:16,
from …/include/boost/beast/ssl.hpp:15,
from include/websocket.hpp:111,
from login.hpp:10,
from main.cpp:1:
/usr/include/openssl/ossl_typ.h:144:22: note: ‘typedef struct ui_st UI’
144 | typedef struct ui_st UI;
In file included from /usr/include/openssl/engine.h:24,
from …/include/boost/asio/ssl/detail/openssl_types.hpp:26,
from …/include/boost/asio/ssl/context_base.hpp:19,
from …/include/boost/asio/ssl/context.hpp:23,
from …/include/boost/asio/ssl/stream.hpp:26,
from …/include/boost/beast/websocket/ssl.hpp:16,
from …/include/boost/beast/ssl/ssl_stream.hpp:16,
from …/include/boost/beast/ssl.hpp:15,
from include/websocket.hpp:111,
from login.hpp:10,
from main.cpp:1:
Note reference to ‘UI’ is ambiguous
and the two suggested candidates in the above (one from Urho3D, and other from OpenSSL). I have bolded the relevant lines to make it slightly easier to read.
I am not polluting namespaces (not using using
anywhere).
Is this something we were already aware of? How do I get around it if both Urho3D and OpenSSL want UI in the public namespace?
I am running G++ v9.3.0 from the Ubuntu 20.04 repos.