ClothSimulation icon indicating copy to clipboard operation
ClothSimulation copied to clipboard

How do I compile this?

Open ari-weber opened this issue 4 years ago • 15 comments

I have no idea how to compile this, nothing I have found online works at all...

ari-weber avatar Sep 01 '21 02:09 ari-weber

Visual Studio Code with CMake C++ and a few other exts

Laamy avatar Sep 01 '21 02:09 Laamy

Pretty sure you need these "C/C++" "C/C++ Include Guard " "CMake" & "CMake Tools"

Laamy avatar Sep 01 '21 02:09 Laamy

You can have a look at this https://github.com/johnBuffer/AntSimulator#compilation, the procedure is similar.

johnBuffer avatar Sep 01 '21 10:09 johnBuffer

For anyone having issues with the compilation, to compile just navigate to the main directory of 'ClothSimulation' e.g. for me its ned@debian:~/ClothSimulation$ Here open a terminal and first make sure you have cmake, build-essential and gdb installed, if not you can just run;

sudo apt-get install cmake build-essential gdb

Now in the main directory run cmake . Next run make Then you can run the script with sudo ./Cloth

Nedcotter avatar Sep 07 '21 10:09 Nedcotter

how do i specify where my sfml headers are located?

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

it gives me that project files may be invalid, no wonder, cause i didn't even include, the path where to get sfml headers, and i don't really know how to

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

If SFML is intalled CMake will find it automatically. What os are you on ?

johnBuffer avatar Sep 10 '21 08:09 johnBuffer

windows

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

should i put sfml in the path, or something?

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

what do you mean by installed? just being on my computer? Yes it is installed, i used it quite many times for my sfml projects

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

tho, it's not in the same folder as cmake, not sure how cmake searches for the needed libraries

ShaneWooosh avatar Sep 10 '21 08:09 ShaneWooosh

What I mean by installed is "being known to cmake". To do so I personally build it myself and then build the "install" custom target in the solution generated by cmake

johnBuffer avatar Sep 10 '21 08:09 johnBuffer

what does "install" custom target mean?

ShaneWooosh avatar Sep 10 '21 09:09 ShaneWooosh

A custom Target is a file which will run install and some other script after. e.g. In the ClothSimulation that would be the cmake_install.cmake as i show in the top right here: image

Nedcotter avatar Sep 10 '21 10:09 Nedcotter

I'm a little late to the party but I hope this helps someone. If you've downloaded a stable version of SFML, you can modify the SFML_DIR parameter in CMake to identify where you have SFML "installed", similar as such:

Screenshot 2023-12-21 164501

lordovthevoid avatar Dec 21 '23 22:12 lordovthevoid