I\'m trying to port an old library (that doesn\'t use namespaces as far as I can tell) to modern compilers. One of my targets can\'t tell the difference between System::TObj
You can do as Dib suggested, with a slight modification:
// In a wrapper header, eg: include_oldlib.h...
namespace oldlib
{
#include "oldlib.h"
};
#ifndef DONT_AUTO_INCLUDE_OLD_NAMESPACE
using namespace oldlib;
#endif
This allows you to #define the exclusion in only the files where you're getting conflicts, and use all the symbols as global symbols otherwise.