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
I've had a few problems getting this to compile with VS 2022 on Windows 10 and I've worked through them, but I wanted to document them for you.
Required VS features
First, it might be worth noting in the README that VS 2022 apparently needs to be told explicitly to install the following, under "Tools" -> "Get Tools and Features" :
"C++ CMake tools for Windows" (I think it's required but not positive)
"Windows 10 SDK"
"WIN32" undefined
Dependencies fail to compile because "WIN32" is not defined (i.e. if defined(WIN32) and #ifdef WIN32 return false). I just slapped add_definitions(-DWIN32) into CMakeLists.txt but I imagine there's a proper way to fix this.
Build flags
The build failed without the /EHsc flag. I ended up building with:
cmake -DCMAKE_CXX_FLAGS="/EHsc" -G "Visual Studio 17 2022" ..
I just upgraded, myself. Found your repo a few hours later and was kicking myself -- considered going right back. :P
Would it be alright to submit PRs, or maybe feature requests -- like, for exporting the SDF textures, loading in meshes through GUI, and such? Or, would you rather keep this a minimal sample?
Exporting the SDF textures might be a good idea, but I don’t want the sample to be too bloated since it’s meant to be somewhat educational. But feel free to submit PRs for this or the framework.
I've had a few problems getting this to compile with VS 2022 on Windows 10 and I've worked through them, but I wanted to document them for you.
Required VS features
First, it might be worth noting in the README that VS 2022 apparently needs to be told explicitly to install the following, under "Tools" -> "Get Tools and Features" :
"WIN32" undefined
Dependencies fail to compile because "WIN32" is not defined (i.e.
if defined(WIN32)
and#ifdef WIN32
return false). I just slappedadd_definitions(-DWIN32)
intoCMakeLists.txt
but I imagine there's a proper way to fix this.Build flags
The build failed without the
/EHsc
flag. I ended up building with:dwSampleFramework problem
In
main.cpp
, this line kept it from compiling:There was no suitable overload for
set_uniform
in dwSampleFramework.I declared this (in dwSampleFramework) in
ogl.h
:and defined this in
olg.cpp
:Everything looks fine now. Thanks for sharing this example.
The text was updated successfully, but these errors were encountered: