juanmanzanero / fastest-lap

Fastest-lap is a vehicle dynamics simulator. It can be used to understand vehicle dynamics, to learn about driving techniques, to design car prototypes, or just for fun!
MIT License
575 stars 43 forks source link

Project Compilation on Windows #34

Closed mambro closed 2 years ago

mambro commented 2 years ago

Hi Juan,

First of all I want to congratulate you on such a project, your fastest-lap looks really cool!

I've found it very interesting and I would like to deepen it. Because of this, I would like to build the project on my Windows machine, not just use the binaries you've provided.

I've seen that one of the third-party packages used by fastest-lap -lion- requires a Fortran compiler. Do you have any suggestions for any specific Fortran compiler on Windows as you have for Linux and Mac?

Thanks for you time!

juanmanzanero commented 2 years ago

Hello Michele. Thank you for your very kind words.

A full compilation requires a Fortran compiler, but this is only to compile a third party -Mumps- required by Ipopt. You might wanna bypass this and skip this step by downloading their pre-compiled binaries: https://github.com/coin-or/Ipopt/releases/download/releases%2F3.14.9/Ipopt-3.14.9-win64-msvs2019-md.zip

Otherwise, if you want to compile everything yourself (I do it this way personally), I use Intel Parallel studio

mambro commented 2 years ago

Hello Juan, thanks a lot for your quick reply :)

I've actually already found out some first info to build the project on Windows in the release info of 0.1.0 version. I've therefore installed the Intel Fortran Compiler 2022.1.0, I had instead Visual Studio 2019 with C++ and CMake workflow already installed.

That said, I haven't unfortunately managed to build the project, could you please share some more details? For instance, which CMake generator are you using? Ninja or Visual Studio itself? Do you have any CMakePreset.json config file to share?

Thanks, Michele

juanmanzanero commented 2 years ago

I am not using CMake to compile on Windows, I just use Microsoft Visual Studio GUI, by setting the appropriate include dirs, macros, and linking libraries.

I do not have my windows computer with me right now, so probably if I tell you the steps, I will miss some. So maybe you can install WSL (windows subsystem for linux) in the mean time, and explore the code from linux. If you want to use it directly on windows, you can just use the pre-compiled binaries

Cheers!