Ambiguous symbol in Noesis Utils vs main lib - C++ Unity build
EDIT: Please disregard - I realized I *never* upgraded my NoesisGUI version, so this is years out of date. Worth trying the NsApp in a Unity C++ build at some point if you're curious, however.
--------------------------------------------
This is mostly by my own doing but I thought I'd pass it on in case you wanted to adjust the utils you provide (NsApp etc), which I moved into my own lib called "NoesisUtils" in my repository, with includes from NsApp, NsRender, and NoesisUtils.h.
There's a collision between NsApp/TriggerCollection.h and the main library's NsGui/FrameworkElement.h with regards to the symbol "TriggerCollection". If you try to build this utils lib with a unity build (i.e. all .cpp files squashed together automatically for better build times), you get the following
Here are the two sources.
NsGui/FrameworkElement.h:
NsApp/TriggerCollection.h:
I can try and make some changes locally but I thought I'd mention it in case that collision could be resolved in some future version, though fairly low impact/priority I know :)
Thanks!
EDIT: The local fix was to change this in the Noesis lib provided header BaseTrigger.h, and any header that referenced it
--------------------------------------------
This is mostly by my own doing but I thought I'd pass it on in case you wanted to adjust the utils you provide (NsApp etc), which I moved into my own lib called "NoesisUtils" in my repository, with includes from NsApp, NsRender, and NoesisUtils.h.
There's a collision between NsApp/TriggerCollection.h and the main library's NsGui/FrameworkElement.h with regards to the symbol "TriggerCollection". If you try to build this utils lib with a unity build (i.e. all .cpp files squashed together automatically for better build times), you get the following
Code: Select all
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Private\Interaction.cpp(80,5): error C2872: 'TriggerCollection': ambiguous symbol
2>(compiling source file 'CMakeFiles/NoesisUtils.dir/Unity/unity_3_cxx.cxx')
2>C:\_Development\Repositories\rtg\third_party\Noesis\Include\NsGui\FrameworkElement.h(43,35):
2>could be 'Noesis::UICollection<Noesis::BaseTrigger> Noesis::TriggerCollection'
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Public\NsApp\TriggerCollection.h(27,32):
2>or 'NoesisApp::TriggerCollection'
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Private\Interaction.cpp(80,58): error C2872: 'TriggerCollection': ambiguous symbol
2>(compiling source file 'CMakeFiles/NoesisUtils.dir/Unity/unity_3_cxx.cxx')
2>C:\_Development\Repositories\rtg\third_party\Noesis\Include\NsGui\FrameworkElement.h(43,35):
2>could be 'Noesis::UICollection<Noesis::BaseTrigger> Noesis::TriggerCollection'
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Public\NsApp\TriggerCollection.h(27,32):
2>or 'NoesisApp::TriggerCollection'
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Private\Interaction.cpp(83,9): error C2039: 'GetAssociatedObject': is not a member of 'Noesis::UICollection<Noesis::BaseTrigger>'
2>(compiling source file 'CMakeFiles/NoesisUtils.dir/Unity/unity_3_cxx.cxx')
2>C:\_Development\Repositories\rtg\third_party\Noesis\Include\NsGui\UIElement.h(34,25):
2>see declaration of 'Noesis::UICollection<Noesis::BaseTrigger>'
2>C:\_Development\Repositories\rtg\libs\NoesisUtils\Private\Interaction.cpp(84,22): error C2039: 'Detach': is not a member of 'Noesis::UICollection<Noesis::BaseTrigger>'
2>(compiling source file 'CMakeFiles/NoesisUtils.dir/Unity/unity_3_cxx.cxx')
NsGui/FrameworkElement.h:
Code: Select all
template<class T> class UICollection;
typedef UICollection<BaseTrigger> TriggerCollection;
Code: Select all
template<class T> class UICollection;
typedef UICollection<BaseTrigger> TriggerCollection;
Thanks!
EDIT: The local fix was to change this in the Noesis lib provided header BaseTrigger.h, and any header that referenced it
Code: Select all
template<class T> class UICollection;
typedef Noesis::UICollection<Noesis::BaseSetter> BaseSetterCollection;
typedef Noesis::UICollection<Noesis::BaseTrigger> BaseTriggerCollection; // was previously 'TriggerCollection'
typedef Noesis::UICollection<Noesis::TriggerAction> TriggerActionCollection;
-
sfernandez
Site Admin
- Posts: 3093
- Joined:
Re: Ambiguous symbol in Noesis Utils vs main lib - C++ Unity build
I created ticket #2999 to fix this issue because we need to properly disambiguate those symbols using the namespace.
Re: Ambiguous symbol in Noesis Utils vs main lib - C++ Unity build
Fixed, marking as solved
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests