You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I believe you now have to define BENCHMARK_STATIC_DEFINE if you are producing a static lib.
When linking against benchmark::benchmark_main I get those unresolved external symbol.
_Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl benchmark::PrintDefaultHelp(void)" (__imp_?PrintDefaultHelp@benchmark@@YAXXZ) referenced in function main
Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl benchmark::Initialize(int *,char * *,void (__cdecl*)(void))" (__imp_?Initialize@benchmark@@YAXPEAHPEAPEADP6AXXZ@Z) referenced in function main
_Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl benchmark::Shutdown(void)" (__imp_?Shutdown@benchmark@@YAXXZ) referenced in function main
_Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) bool __cdecl benchmark::ReportUnrecognizedArguments(int,char * *)" (__imp_?ReportUnrecognizedArguments@benchmark@@YA_NHPEAPEAD@Z) referenced in function main
_Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) unsigned __int64 __cdecl benchmark::RunSpecifiedBenchmarks(void)" (__imp_?RunSpecifiedBenchmarks@benchmark@@YA_KXZ) referenced in function main
D_Out\build\windows-vs2022\benchmark_main.lib(benchmark_main.cc.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl benchmark::internal::InitializeStreams(void)" (__imp_?InitializeStreams@internal@benchmark@@YAHXZ) referenced in function "void __cdecl benchmark::internal::`dynamic initializer for 'stream_init_anchor''(void)" (??__Estream_init_anchor@internal@benchmark@@YAXXZ)
_Out\build\windows-vs2022\_bin\Debug\ApplicationCoreBenchmarks.exe : fatal error LNK1120: 6 unresolved externals
Environment
OS: Windows
To Reproduce
Steps to reproduce the behavior:
link against benchmark::benchmark_main
build
Expected behavior
No linker error
The text was updated successfully, but these errors were encountered:
Describe the bug
I believe you now have to define BENCHMARK_STATIC_DEFINE if you are producing a static lib.
When linking against benchmark::benchmark_main I get those unresolved external symbol.
Environment
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No linker error
The text was updated successfully, but these errors were encountered: