0
沒有構件我有這樣的代碼:C++在Xcode - 在命名空間
#ifndef LUA_CALLBACKS_H
#define LUA_CALLBACKS_H
extern "C"
{
#include "./lua_lib/lua.h"
#include "./lua_lib/lualib.h"
#include "./lua_lib/lauxlib.h"
}
#include "./LuaWrapper.h"
static int X(lua_State *L)
{
LuaCpp::LuaWrapper::GetInstance();
return 1;
}
#endif
在 「LuaWrapper.h」 我有:
#ifndef LUA_WRAPPER_H
#define LUA_WRAPPER_H
namespace LuaCpp
{
class LuaWrapper
{
public:
static LuaWrapper * GetInstance() { return nullptr; }
}
}
#endif
我已正確附帶LuaWrapper文件。不過,我有在XCode中此錯誤(LLVM 8.1)
- 命名空間中的任何成員的名字 「LuaWrapper」 LuaCpp
相同的代碼編譯正確在Visual Studio 2015年注:上面的代碼是「虛擬」,它不會做任何事情。但它不編譯。
無影響..同樣的錯誤 –