Closed david-alvarez-rosa closed 8 months ago
what version of macOS are you running?
it looks a lot like the the dummy program was compiled before an upgrade, and the library after the upgrade. i can't see immediately how this is related to the benchmark library as this is an OS level relating to different on-device frameworks/system libraries.
I'm ussing MacOS Ventura 13.6.
❯ uname -v
Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:28 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T6000
I did both things (compiling the library, and compiling the dummy program) the same afternoon (within a couple of hours). I was learning on how to use Google's benchmark for C++.
did you build the library with CMake? i wonder if you have both system frameworks installed and cmake picks the newest while raw clang++
picks the older...
Indeed @dmah42, thank you very much. Compiling the dummy program also by using CMake solved the issue!
Describe the bug I'm not able to use the library in M1 MacOS laptop after system-wide installation.
System Which OS, compiler, and compiler version are you using:
To reproduce Steps to reproduce the behavior:
static void BMStringCreation(benchmark::State& state) { for (auto : state) std::string empty_string; } // Register the function as a benchmark BENCHMARK(BM_StringCreation);
// Define another benchmark static void BMStringCopy(benchmark::State& state) { std::string x = "hello"; for (auto : state) std::string copy(x); } BENCHMARK(BM_StringCopy);
BENCHMARK_MAIN();
Expected behavior Expected behavior is successful compilation.
Actual result When compiling I'm getting the following error
Additional context Nope.