README.md
(#1211)
When the library is built using GCC it is necessary to link with the pthread
library due to how GCC implements std::thread
. Failing to link to pthread will
lead to runtime exceptions (unless you're using libc++), not linker errors. See
issue #67 for more details. You
can link to pthread by adding -pthread
to your linker command. Note, you can
also use -lpthread
, but there are potential issues with ordering of command
line parameters if you use that.
On QNX, the pthread library is part of libc and usually included automatically
(see
pthread_create()
).
There's no separate pthread library to link.
The shlwapi
library (-lshlwapi
) is required to support a call to CPUInfo
which reads the registry. Either add shlwapi.lib
under [ Configuration Properties > Linker > Input ]
, or use the following:
// Alternatively, can add libraries using linker options.
#ifdef _WIN32
#pragma comment ( lib, "Shlwapi.lib" )
#ifdef _DEBUG
#pragma comment ( lib, "benchmarkd.lib" )
#else
#pragma comment ( lib, "benchmark.lib" )
#endif
#endif
Can also use the graphical version of CMake:
CMake GUI
.Where to build the binaries
, same path as source plus build
.CMAKE_INSTALL_PREFIX
, same path as source plus install
.Configure
, Generate
, Open Project
.See instructions for building with Visual Studio. Once built, right click on the solution and change the build to Intel.
If you're running benchmarks on solaris, you'll want the kstat library linked in
too (-lkstat
).
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。