I'm using libconfig inside a project and thought convenient to compile it with the rest of the code using my nested CMakeLists.txt scripts. Here are the contents of the directory where the libconfig source files are located:
[config] -> ls
CMakeLists.txt libconfig.c libconfig.h++ scanctx.h strbuf.c
grammar.c libconfigcpp.c++ libconfig.hh scanner.c strbuf.h
grammar.h libconfigcpp.cc parsectx.h scanner.h wincompat.h
grammar.y libconfig.h scanctx.c scanner.l
Here are the contents of CMakeLists.txt:
set(config_source_files
grammar.c
libconfig.c
libconfigcpp.c++
scanctx.c
scanner.c
strbuf.c
)
add_library(config ${config_source_files})
I get a few warnings when I compile on my Linux (Fedora 20) machine. I get an error when I compile on my OSX (Yosemite) machine:
/Users/m4urice/myproject/src/utilities/config/libconfig.c:90:3: error:
use of undeclared identifier 'locale_t'
locale_t loc = newlocale(LC_NUMERIC_MASK, "C", NULL);
Does anyone have an idea of what this could be due to?