#ifndef UNO_ACTION_
#define UNO_ACTION_
namespace Uno
{
namespace Game
{
class Game;
}
} // namespace
namespace Uno
{
namespace Action
{
using ::Uno::Game::Gam
I had a similar issue and found this question but the solutions don't match mine completely, so I'm adding mine here.
In my case, I was including a header file in .cpp files and .c files. The solution was to split off the namespace part of the header since that was obviously only needed in the .cpp files.
It sounds like you're trying to compile your C++ code with a C compiler. Try using g++
instead of gcc
and giving your file a C++ extension such as .cpp
(rather than .c
).
Had this issue with YCM and clang. Turns out, the missing flag was "-x", "c++"
.
From the official clang documentation:
-x <language> : Treat subsequent input files as having type language.