Closed OrientalSiru closed 5 months ago
What is your question? Especially given the compiler messages are self-explanatory.
In general, we do not support non-CMake builds. We also do not maintain the vcpkg version of glog.
If you choose to integrate glog from scratch, you need to replicate the compiler options and defines set by CMake.
I'm closing the issue since the problem is clearly caused by incorrect/unsupported glog integration. Note that similar questions have been asked before: #1091 #1079. The documentation also explicitly states that Bazel or CMake integration is required. Therefore, the issue is not actionable.
@sergiud Do you know who maintains the vcpkg version of glog? vcpkg claims to support non-CMake builds, so I was hoping it has a solution to make it work with non-CMake.
The documentation contributed to glog states that the packages are maintained by the vcpkg project.
I am using the non-CMake version of Visual Studio, and I installed glog with vcpkg. However, I get the following error when trying to include the library:
Error C1189 #error: <glog/logging.h> was not included correctly. See the documention for how to consume the library.
Tried to resolve the above by adding
#define GLOG_USE_GLOG_EXPORT
, I get another error:Error C4996 google::CustomPrefixCallback': Use PrefixFormatterCallback instead.
Repro
.\vcpkg\vcpkg.exe install glog
#include <glog/logging.h>