felipeek / raw-physics

Simple rigid-body physics simulator powered by XPBD.
MIT License
108 stars 8 forks source link

Can't compile #5

Closed yunusbayraktaroglu closed 11 months ago

yunusbayraktaroglu commented 1 year ago

Hi Felipe!

What is your compile setup. I take "error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax".

felipeek commented 1 year ago

Hi @yunusbayraktaroglu,

On Linux, I usually compile with g++ 9.4.0, whereas on Windows I currently have VS 2022 (cl 19.31.31107)

Could you share more information about your setup? And also the lines that are giving you errors? Are you using VS 2015?

yunusbayraktaroglu commented 1 year ago

Windows VS 2022 - cl 19.35.32217.1

Build.bat runs successfully, but builded files needs to be moved to the root folder.

When I try to compile via debugger i get:

felipeek commented 1 year ago

@yunusbayraktaroglu Oh, the build.bat is working, so there are no issues with your setup.

I think you are saying that you are trying to compile the project as a Visual Studio solution, is that correct? I didn't provide a VS solution as part of this project, so you need to configure it yourself. However, it should be very easy to do so.

The errors that you are seeing are because the compiler is not receiving the parameter /wd4576. You should look at all parameters that are being passed to cl in the build.bat and try to replicate to your setup.

In the case of /wd4576, you can, for example, add the value 4576 to your VS Project configuration under [Configuration Properties > C/C++ > All Options > Disable Specific Warnings]

You will also need to set the C++ standard to /std::c++20 [Configuration Properties > C/C++ > All Options > C++ Language Standard]

And of course you will need to add the include folder as an include directory and all .libs that should be linked as additional linker dependencies (the provided ../lib/win64/glew32.lib ../lib/win64/glfw3dll.lib ones, as well as system provided ones that might not be there by default, such as opengl32.lib)

This should do it. If you are using another IDE that is not VS, then I can't help much, but you should be able to enforce the compiler/linker options there as well