In a managed C ++ project, we can use the "Using namespace" expression to include managed types. just like using "# include" incorrectly will cause some compile error, declaring "Using namespace" globally will cause some problems too. we encountered "ambiguous symbol" error when integrating ASM 4100. to resolve the issue, we can make the "using namespace" impact locally.
For example. The following code may have "ambiguous symbols" error:
//Fiexternaldatabaseinfo. h Using namespace system; Namespace Autodesk { Namespace Catalyst { Namespace Freeway { Namespace Components { Namespace fiexternaldatabaseinfo { Public ref class externaldatabaseinfo { } } |
We can resolve it by using system namespace inside Autodesk: catalyst: freeway: components: fiexternaldatabaseinfo only:
Namespace Autodesk { Namespace Catalyst { Namespace Freeway { Namespace Components { Namespace fiexternaldatabaseinfo { Using namespace system; Public ref class externaldatabaseinfo { }; } |