I am using two different c++ libraries. Both libraries use a name for a type, let's say, called fofo. In lib1.h:
typedef short fofo;
In lib2.h:
namespace LIB2
{
typedef struct
{
uint16_t toto;
} fofo;
}
using LIB2::fofo;
I have a C++ project/VS 2008 that uses both libraries: when I do in my project
#include lib1.h
I get the error: error C2874: using-declaration causes a multiple declaration
I would like to use in my project both libraries but without making any change to these libraries. The only thing that I can modify is my VS2008 project. Thanks for your help!