My Code:
#include "stdafx.h"
#include <benchmark\benchmark.h>
#include <benchmark\benchmark_api.h>
#include <benchmark\reporter.h>
static void BM_StringCreation(benchmark::State& state) {
while (state.KeepRunning())
std::string empty_string;
}
// Register the function as a benchmark
BENCHMARK(BM_StringCreation);
BENCHMARK_MAIN()
-------------------------------------------------------------
ERROR I am getting:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>stdafx.cpp
1>HelloWorld.cpp
1>benchmark.lib(sysinfo.obj) : error LNK2019: unresolved external symbol __imp__SHGetValueA@24 referenced in function "void __cdecl benchmark::`anonymous namespace'::InitializeSystemInfo(void)" (?InitializeSystemInfo@?A0x2d55634d@benchmark@@YAXXZ)
1>c:\users\lenovo\documents\visual studio 2017\Projects\HelloWorld\Debug\HelloWorld.exe : fatal error LNK1120: 1 unresolved externals
1>Done building project "HelloWorld.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
------------------------------------------------------------
I have already verified that benchmark.lib file path and name is correctly configured.
Can someone please look into this?
--
You received this message because you are subscribed to the Google Groups "benchmark-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to benchmark-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.