How to fix the Unbound module Graphics in an ocaml project

Image
From ~/pr/gitl/ocaml-gol In a constant effort to learn new programming languages, I'm currently trying to use ocaml , a free and open-source general-purpose, multi-paradigm programming language maintained at the Inria . It's basically an extension of Caml with object-oriented features. I'm mostly interested by its functionnal and pattern matching features but the module part of the language can be a bit difficult to understand for someone with little to none ML (Meta Language) background.   The error When trying to use the graphics module to create a graphical window and go just a little further than the simplest helloworld program, here is the result : If the project uses dune : (executable (name ocaml_project) (libraries lwt.unix graphics) ) with this code : let () = Printf.printf "Hello, world!\n";; Lwt_io.printf "Hello, world!\n";; Graphics.open_graph " 800x600";; The first times I built this project running the du...

Building rigs of rods on Debian

Today, I tried to build Rigs Of Rods from sources.While building dependencies with the official wiki documentation worked but I had a strange issue with the cmake . command :

Original news

CMake Error at source/version_info/CMakeLists.txt:45 (add_library):

Cannot find source file:



.../rigs-of-rods/source/version_info/version_info.cpp



Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp

.hxx .in .txx

It seems that cmake needs this file to generate the source/version_info/ files. The solution is quite simple, call this command from the RoR root directory :

touch source/version_info/version_info.cpp

This creates an empty file and you'll be able to correctly run cmake again.

Aug. 2022 update

This news is very old and I'm not on debian anymore so I can't test it again. I'm now on manjaro, an arch-based distribution that uses another package manager and rigs of rods can be found in Archlinux User Repository here.

For other distributions and even for windows, precompiled versions of the game can be downloaded from the official website.

Comments

Popular posts from this blog

How to make a map of variant in C++