1

含まれているZenLibヘッダーファイルには、この定義構成があります

//Char types
#if defined(__UNICODE__)
    #if defined (_MSC_VER) && !defined (_NATIVE_WCHAR_T_DEFINED)
        #pragma message Native wchar_t is not defined, not tested, you should put /Zc:wchar_t in compiler options
    #endif
    typedef wchar_t Char;
    #undef  __T
    #define __T(__x) L ## __x
#else // defined(__UNICODE__)
    typedef char Char;
    #undef  __T
    #define __T(__x) __x
#endif // defined(__UNICODE__)
#ifdef wchar_t
    typedef wchar_t wchar;
#endif // wchar_t

//***************************************************************************
// Platform differences
//***************************************************************************

//End of line
extern const Char* EOL;
extern const Char  PathSeparator;

最後の2行は、次のメッセージでコンパイルに失敗します。

../ZZZ/ZenLib/Conf.h:243: error: expected unqualified-id before string constant
../ZZZ/ZenLib/Conf.h:243: error: expected initializer before string constant
make: *** [mediainfo.o] Error 1

コンパイラがここで何を期待しているのか、誰かが洞察を与えることができますか?cppファイルとしてコンパイルされているため、c++としてもタグ付けされています。

アプリケーションの観点から、それはタイプ定義されるべきですchar

4

1 に答える 1

1

EOLインクルードするヘッダーファイルの1つに、宣言を行うための定義が含まれています

extern const Char* EOL;

のように見える

extern const Char* '\n'; // or '\r', or a numeric constant

名前EOLを別の名前に変更する、たとえばEol、またはEOL_CHAR役立つはずです。

于 2012-08-18T12:13:53.103 に答える