Próbuję skompilować projekt, który ma następujący nagłówek: locale.h;Nie można skompilować projektu: błąd w pliku locale.h
locale.h:
class LOG4CXX_EXPORT Locale
{
public:
...
protected:
Locale(const Locale&);
Locale& operator=(const Locale&);
const LogString language; <-- error
const LogString country; <-- error
const LogString variant; <-- error
}; // class Locale
Czy ktoś może dać mi jakieś sugestie?
Otrzymuję ten błąd. Nie jestem pewien jaki jest problem.
/LOGGER/include/log4cxx/helpers/locale.h:42:41: error: field ‘language’ has incomplete type
const LogString language;
^
/LOGGER/include/log4cxx/helpers/locale.h:43:41: error: field ‘country’ has incomplete type
const LogString country;
^
/LOGGER/include/log4cxx/helpers/locale.h:44:41: error: field ‘variant’ has incomplete type
Podejrzewam, że twój własny nagłówek o nazwie 'locale.h' koliduje z nagłówkiem systemu' locale.h'. Wydaje się, że kompilator zawiera ** twoje ** 'locale.h' z' clocale'. Zmień nazwę swojego 'locale.h' na coś innego, aby wyeliminować konflikt. – AnT
AnT, może być tak ... jak mogę wykluczyć wywołanie nagłówka systemu locale.h? – cristian
Nie można wykluczyć nagłówka systemu. Jak pokazuje stos zawierający stos, jest wymagany przez nagłówek 'string'. Nie rozumiem od razu, dlaczego twój nagłówek nadpisuje to ... – AnT