Boost logo

Boost :

Subject: [boost] UUID broken with Boost 1.67 and VS2015?
From: rleigh_at_[hidden]
Date: 2018-04-23 16:43:39


In a source file including:

#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>

and then calling

boost::uuids::to_string(boost::uuids::random_generator()())

I'm getting:

[15/26] Linking CXX executable test\ome-files\ometiffwriter.exe
FAILED: test/ome-files/ometiffwriter.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E
vs_link_exe --intdir=test\ome-files\CMakeFiles\ometiffwriter.dir
--manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo
test\ome-files\CMakeFiles\ometiffwriter.dir\ometiffwriter.cpp.obj
test\ome-files\CMakeFiles\ometiffwriter.dir\tiffsamples.cpp.obj
/out:test\ome-files\ometiffwriter.exe
/implib:test\ome-files\ometiffwriter.lib
/pdb:test\ome-files\ometiffwriter.pdb /version:0.0 /machine:x64
/debug /INCREMENTAL /subsystem:console lib\ome\files\ome-filesd.lib
lib\ome\test\ome-testd.lib C:\build\b\stage\lib\ome-xmld.lib
C:\build\b\stage\lib\boost_random-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\tiffd.lib C:\build\b\stage\lib\ome-commond.lib
C:\build\b\stage\lib\boost_iostreams-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_log-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_filesystem-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_regex-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_log_setup-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_thread-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_date_time-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_chrono-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_system-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_atomic-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\Xalan-C_1D.lib C:\build\b\stage\lib\xerces-c_3D.lib
C:\build\b\tools\lib\gtest.lib kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe
/nologo
test\ome-files\CMakeFiles\ometiffwriter.dir\ometiffwriter.cpp.obj
test\ome-files\CMakeFiles\ometiffwriter.dir\tiffsamples.cpp.obj
/out:test\ome-files\ometiffwriter.exe
/implib:test\ome-files\ometiffwriter.lib
/pdb:test\ome-files\ometiffwriter.pdb /version:0.0 /machine:x64 /debug
/INCREMENTAL /subsystem:console lib\ome\files\ome-filesd.lib
lib\ome\test\ome-testd.lib C:\build\b\stage\lib\ome-xmld.lib
C:\build\b\stage\lib\boost_random-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\tiffd.lib C:\build\b\stage\lib\ome-commond.lib
C:\build\b\stage\lib\boost_iostreams-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_log-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_filesystem-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_regex-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_log_setup-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_thread-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_date_time-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_chrono-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_system-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\boost_atomic-vc140-mt-gd-x64-1_67.lib
C:\build\b\stage\lib\Xalan-C_1D.lib C:\build\b\stage\lib\xerces-c_3D.lib
C:\build\b\tools\lib\gtest.lib kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib /MANIFEST
/MANIFESTFILE:test\ome-files\CMakeFiles\ometiffwriter.dir/intermediate.manifest
test\ome-files\CMakeFiles\ometiffwriter.dir/manifest.res" failed (exit
code 1120) with the following output:
    Creating library test\ome-files\ometiffwriter.lib and object
test\ome-files\ometiffwriter.exp
ome-filesd.lib(OMETIFFWriter.cpp.obj) : error LNK2019: unresolved
external symbol BCryptCloseAlgorithmProvider referenced in function
"public: __cdecl
boost::uuids::detail::random_provider_base::~random_provider_base(void)"
(??1random_provider_base_at_detail@uuids_at_boost@@QEAA_at_XZ)
ome-filesd.lib(OMETIFFWriter.cpp.obj) : error LNK2019: unresolved
external symbol BCryptGenRandom referenced in function "public: void
__cdecl
boost::uuids::detail::random_provider_base::get_random_bytes(void
*,unsigned __int64)"
(?get_random_bytes_at_random_provider_base_at_detail@uuids_at_boost@@QEAAXPEAX_K_at_Z)
ome-filesd.lib(OMETIFFWriter.cpp.obj) : error LNK2019: unresolved
external symbol BCryptOpenAlgorithmProvider referenced in function
"public: __cdecl
boost::uuids::detail::random_provider_base::random_provider_base(void)"
(??0random_provider_base_at_detail@uuids_at_boost@@QEAA_at_XZ)
test\ome-files\ometiffwriter.exe : fatal error LNK1120: 3 unresolved
externals

Looking at boost/winapi/bcrypt.hpp from the 1.67.0 source tar.bz2, I see
these symbols prototyped, but not defined anywhere. Is this header
broken, missing the implementation?

Thanks,
Roger


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk