Cross compiler: ARM64 (version 7.4.0)
Host: ubuntu 18.04
Compiling with -std=c++17
Successfully cross compiled log4cpp (1.1.3) source for arm64 on Ubuntu 18.04.
When I compile our application against log4cpp, we get following error message: "Naming collision for 'DEBUG' detected. Please read the FAQ for a workaround".
I read FAQ and defined LOG4CPP_FIX_ERROR_COLLISION to 1. Then I got, ERROR is not defined. I think I am seeing this issue because Linux defined ERROR as #define ERROR.
Any immediate solution would be appreciated.
Library version
log4cpp (1.1.6)includes examples folder, which builds smaller programs using the library.I've run a test to ensure cross compilation with
g++-aarch64-linux-gnuworks and binary is able to log lines using the library when clean build is used:x86_64host runningUbuntu 24.04and cross compilinglog4cppforaarch64builds example binary and executes it well:cmake/toolchain-x86_64-aarch64.cmake