What AnT wrote in a comment is a solution to the problem:
<clocale> includes your <locale.h> instead of the system that it should do; your language is trying to include <string>, which again includes <clocale>.
So in the end you will get a circular inclusion, as I described in your other question https://stackoverflow.com/questions/32379927/header-file-does-not-compile-locale-h , only the chain is longer ...
You need to break this inclusion circle. You can do this by removing the directory where the file is located from the inclusion directories that you pass to gcc (I assume this is -I "/ LOGGER / include / log4cxx / helpers"). Instead, you can specify the path to the parent directory (-I "/ LOGGER / include /"). Instead of #include <locale.h> you will have to use #include <log4cxx / helpers / locale.h>.
In fact, I recommend storing "/ LOGGER / include" as the only directory you give gcc and have all the other files you need through the appropriate subpath - if the rest of the log4cxx files allow this (which I would suggest).
In addition, the only way to solve the problem is to rename your file "locale.h" to something else (in addition, to change the separation of the include path, for example -I "/ LOGGER / include / log4cxx" and #include <helpers / locale .h>; what I chose, however, is the most natural IMO).
source share