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
While building our project with Visual Studio 2017 and linking to the new boost 1.69, I encountered the following error:
c:/git/oss/boost/1.69.0\boost/system/detail/system_category_win32.hpp(52): error C2039: '_snprintf': is not a member of 'std'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\functional(23): note: see declaration of 'std'
make.exe[2]: *** [c:/artifacts/build32//client//core/obj/buttercup.obj] Error 2
I don't actually know what series of header #includes led to system_category_win32.hpp being yanked in, but it is... and it built without error when we were using boost 1.51.
Googling didn't really help explain very well, why this is happening.
Activity
pdimov commentedon Feb 11, 2019
You have
#define snprintf _snprintfsomewhere before including the Boost.System header.pdimov commentedon Feb 11, 2019
(This #define should no longer be necessary for VS2015 and above - it has a legitimate
snprintf.)bstaletic commentedon Feb 12, 2019
I had this problem.
Python.hdoes the followingYou just need to add
/DHAVE_SNPRINTFto your flags.babzog commentedon Feb 12, 2019
That was indeed my problem. That declaration was littered throughout the code. Thank you for the guidance!
omeryasar commentedon Dec 20, 2020
Hi, I have the same problem but I don't understand exactly what should I have to do for fixing the problem. Can you please explain your answer
kedakedaxia commentedon Dec 23, 2020
you can Add to header file "#undef snprintf"
Windows Python 3.7 3.8 and Boost Compatibility Err