I’ve looked around, I need an example for Singleton class that works across 2 or more C++/CLI files.
How do you declare a singleton in C++/CLI, not C# ?
How do you share that singleton across two or more C++/CLI files?
I keep getting Variable redefinitions when I try to share that singleton.
This is for C++/CLI, not “.NET Managed Extensions for C++” aka C++.NET. Don’t use the Managed Extensions (Visual Studio 2002-2003), they’re buggy.
As for “across multiple files”, other compilation units in the same project use
#include, other assemblies use a reference (or#import). Then there won’t be any redefinition issues.