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...

Introducing headers-date

As seen in my previous introducing posts, for example the libwsmeta and todoSummarizer ones, I'm currently freeing some private projects. So a few weeks ago, I released a new ruby project : headers-date.

When a new year starts, all headers of all projects must be updated with the new year. This project will help you search for copyright date and eventually sort these files.

rainbrurpg's c++ header example


The aim of this program is to make a summary of the files recursively found in the given directory sorted by copyright date. While the standard output only prints file number, the verbose output will print all files.

Here's an example output :
/headers-date.rb <project_root>
==>No Copyright found :
  402 file(s) found

==>2016-2017 :
  10 file(s) found

==>2016 :
  1 file(s) found

==>2011, :
  1 file(s) found

==> :
  1 file(s) found

And a verbose output example (the project root directory is replaced with the <project_root> string :
./headers-date.rb -v <project_root>
Verbose mode enabled
==>2016-2017 (10 file(s) found) :
  <project_root>/main.c
  <project_root>/lib/wsmeta_test.h
  <project_root>/lib/wsmeta.c
  <project_root>/lib/wsmeta.h
  <project_root>/lib/lenstring.c
  <project_root>/lib/wsmeta_test.c
  <project_root>/lib/lenstring.h
  <project_root>/lib/tests.c

==>2016 (1 file(s) found) :
  <project_root>/html/wsmeta__test_8h_source.html

==>2011, (1 file(s) found) :
  <project_root>/html/jquery.js

==> (1 file(s) found) :
  <project_root>/.git/hooks/pre-rebase.sample

headers-date is freely available and licensed under the terms of the GPLv3 license.

Comments

Popular posts from this blog

How to make a map of variant in C++