Build FAILED. VS2022

151 views
Skip to first unread message

Bim

unread,
Oct 11, 2023, 8:23:47 AM10/11/23
to G3D Users
Hi!
I just want to test some real-time path tracing (not sure whether it would be possible). I have Visual Studio 2022, and 2019 as well on a Windows 10 (x64) machine. BTW, when I was trying the BUILD the g3d, I got the following error message:


Build FAILED.

"C:\g3d\G3D10\VisualStudio\G3D.sln" (External Libraries\freeimage_lib target) (1) ->
"C:\g3d\G3D10\VisualStudio\freeimage.lib.vcxproj" (default target) (2) ->
(ClCompile target) ->
  C:\g3d\G3D10\external\freeimage.lib\source\OpenEXR\IlmImf\ImfAttribute.cpp(66,26): error C2039: 'binary_function': is
 not a member of 'std' [C:\g3d\G3D10\VisualStudio\freeimage.lib.vcxproj]
  C:\g3d\G3D10\external\freeimage.lib\source\OpenEXR\IlmImf\ImfAttribute.cpp(66,26): error C2504: 'binary_function': ba
se class undefined [C:\g3d\G3D10\VisualStudio\freeimage.lib.vcxproj]
  C:\g3d\G3D10\external\freeimage.lib\source\OpenEXR\IlmImf\ImfAttribute.cpp(66,42): error C2143: syntax error: missing
 ',' before '<' [C:\g3d\G3D10\VisualStudio\freeimage.lib.vcxproj]

    0 Warning(s)
    3 Error(s)


> Are these errors due to the Visual Studio Version? 

Fabian Velasquez

unread,
Oct 11, 2023, 2:06:13 PM10/11/23
to G3D Users
Hello,

Thanks for bringing up this issue. We are aware of this and are currently working on a permanent solution. The temporary fix as of now is to add the include `#include <functional>` to line 48 of the ImfAttribute.cpp file.

Best,
Fabian

Bim

unread,
Oct 12, 2023, 4:18:52 AM10/12/23
to G3D Users
Hello,

Thanks for the swift reply. Apparently, the previous problem has been solved but there are some additional errors (tbb related). Please find the error messages in : tbb related error messages (github.com)

  • My question is, can I build the g3d with MS VS2022? The building shows default it is using VS2022 "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild".
  • I have installed MS VS2017 as well, because this group someone had a problem, and the solution was building with VS2017. If that is the case, how can I predefined VS2017 during the build process?

Fabian Velasquez

unread,
Nov 29, 2023, 8:20:43 PM11/29/23
to G3D Users
Hi,

Yes, G3D can be built with MS VS2022. If this is still a problem, could you check your project properties and ensure that C++ Exceptions are enabled? The second answer on this page gives instructions on how to do this.
Reply all
Reply to author
Forward
0 new messages