Description
Ubuntu 25.04
~/coost$ cmake -B ./build -S .
-- The C compiler identification is GNU 15.0.1
-- The CXX compiler identification is GNU 15.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /home/user/coost/build
$ cd build/
$ cmake --build .
[ 2%] Building CXX object src/CMakeFiles/co.dir/base64.cc.o
[ 5%] Building CXX object src/CMakeFiles/co.dir/benchmark.cc.o
/home/user/coost/include/co/time.h:41:17: error: expected unqualified-id before numeric constant
41 | extern xx::Unix unix;
| ^~~~
gmake[2]: *** [src/CMakeFiles/co.dir/build.make:93: src/CMakeFiles/co.dir/benchmark.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:106: src/CMakeFiles/co.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
I see in an IDE:
predefined macro
unix 1
https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html
extern xx::Mono mono; - a global variable
extern xx::Unix unix; - a predefined macro