Closed ya-isakov closed 4 years ago
Hi, on the master branch? Probably something I f00ped up when working on the rumble bugfix - which I should finally merge ๐
master builds for me!
Yes, I'm on master, and it doesn't work for me 100% of times I tried to build it. Here is the log https://gist.github.com/ya-isakov/fbbf6d23455d92bf6328c964f325e65d. I'm using Build Tools for Visual Studio 2019, btw, so my assumption is that new version of compiler is requiring explicit use of <functional>
. I found similar problem https://stackoverflow.com/questions/24580416/mem-fun-is-not-a-member-of-std, and including a <functional>
solved it.
So, yes, the problem is in MSBuild Tools 2019, ViGEmClient could be successfully compiled with MSBuild Tools 2017.
Interesting, thanks for the details.
In the meantime it builds fine on VS 2019 as well, can anyone confirm besides me and AppVeyor? ๐
I using VS2019 got same result as @ya-isakov
error C2039: 'mem_fn': 'std' ใฎใกใณใใผใงใฏใใใพใใใ
(My environment is Japanese).
And I confirmed latest VS2019 (16.3.8 VC++19.23.28106.4) and latest VS2019 Preview(16.4.0.preview 4.0 VC++ 19.24.28218.2) are in the same result.
I think this problem is due to physical optimization of std library in vs2019 documented in https://docs.microsoft.com/ja-jp/cpp/overview/what-s-new-for-visual-cpp-in-visual-studio?view=vs-2019
Optimized the standard library physical design to avoid compiling parts of the standard library not directly included. This change cut the build time of an empty file that includes only
in half. As a consequence, you may need to add #include directives for headers that were previously indirectly included. For example, code that uses std::out_of_range may now need to add #include . Code that uses a stream insertion operator may now need to add #include . The benefit is that only translation units actually using or components pay the throughput cost to compile them.
I compiled it successfully by adding #include <functional>
to ViGEmClient.cpp
, too
as https://github.com/ttsuki/ViGEmClient/commit/f5afc4b656662280d1473d5477c759ac692cb205
FYI, thanks.
I upgraded to VS 2019, let's see how this works :)
Fixed ๐
Describe the bug I cannot compile the c++ library, compiler breaks with
'mem_fn' : is not a member of 'std'
To Reproduce msbuild ViGEmClient.sln
Expected behavior Library is built :)
Screenshots N/A
System details (please complete the following information):
Additional context I think that
include <functional>
is missing from ViGEmClient.cpp. I've added it, and library is compiled.