admin管理员组文章数量:1394554
I am trying to build log4cxx from source on MacOS (Sequoia, 15.3.2). I am using gcc-14.2.0 installed via homebrew. I have built apr and apr-util from source using the same compiler.
I have downloaded the source for log4cxx 1.4.0 and then try to compile with:
cd apache-log4cxx-1.4.0
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/some/where
make
but I get the error:
<snip>/src/main/cpp/logstream.cpp:44:9: error: 'init' was not declared in this scope; did you mean 'Init'
FYI, lines 43-45 of that file contain:
#if LOG4CXX_INIT_IOS_BASE
init(NULL);
#endif
If I comment out those 3 lines then it compiles fine. Alternatively, if I leave those lines in and use clang, it compiles fine.
I can't find any record of this issue online or in the GitHub issues, which makes me think it's just me, but equally, I cannot fathom this. I did a search for the definition of init()
in the source tree of log4cxx, but I can only find this in src/fuzzers/PatternLayoutFuzzer.cpp
which does not seem connected at all.
Has anyone else seen this issue or know why it occurs? At least at first glance, it seems that the error is 'correct' in that logstream.cpp
is calling an undefined function. But if that were so, surely it would compile for no-one. So I'm confused!
本文标签: cApachelog4cxx will not compile with gcc14 on MacOS Sequoia init not declaredStack Overflow
版权声明:本文标题:c++ - Apache-log4cxx will not compile with gcc-14 on MacOS Sequoia: init not declared - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744100547a2590849.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论