Artifact b1671fa3d56cf5eedb28fcb17b8679d9d7a966503e5d491bfc2edef45abebda1:

Wiki page [Installation] by luismachuca 2020-07-26 16:57:41.
D 2020-07-26T16:57:41.649
L Installation
P cd815b08442050174c9f0106f8a2a90e2969b37c5c5b7d6f53908d2ddcfcc0a9
U luismachuca
W 4540
<h1>Installation</h1>

The [Cxxomfort] library is distributed as "<i>header-only</i>", meaning it is not necessary to compile object code or link to libraries to use it<nowiki>[#1]</nowiki>. All that is necessary is essentially:

  #  Download a copy (pull from repository or archived release)...
  #  Extract / open it somewhere…
  #  Point your compiler's search path to the library...
  #  PROFIT!

For example, under Linux you can install the library by uncompressing it into a directory and then just moving the library's <code>cxxomfort</code> directory under <code>/usr/local/include</code> - or creating a symlink to it - and it should work out of the box without the need to add any search path, since <code>/usr/local/include</code> is a "standard search path".

After you are done installing the library, you might want to check [Configuration|how to configure it] and [Features|how to use it].

<h2>Supported Environments</h2>

At the moment of last update of this article, the following environments are supported:

  *  GCC 4.x (4.6, 4.8); 5.x; 6.x.
  *  MSVC 2008 Express SP1, 2010 Express, 2012 and 2013.
  *  Clang 3.x (3.2 to 3.6); 4.x; 5.x.

Development is currently (2019) held and tested in the following testbeds, in relative order of priority:

  *  Debian Stretch + GCC 4.8/5.5 (main) + Clang 4.x
  *  Windows XP + MSVC 2008 Express / 2010 Express
  *  Ubuntu Trusty + GCC 4.6/5.0

<h2>Methods of Installation</h2>

<b>Clone the repo!</b>:

Get a hand on [http://fossil-scm.org/fossil/doc/tip/www/index.wiki|Fossil] (external link) and use it to clone the repo:

<verbatim>
fossil clone  http://ryan.gulix.cl/fossil.cgi/cxxomfort  cxxomfort.fossil
</verbatim>

Create a directory and from within there open the repository file.

<verbatim>
mkdir cxxomfort && cd cxxomfort
fossil open  ../cxxomfort.fossil
</verbatim>

<b>Or download an archive!</b>:

  *  browse "Files" in the upper navigation bar to get a tarball of the current contents of the repo.
  *  [/download|directly download a zipball of the latest release].

<b>Make the library available</b>

For the library to be visible to your compiler / project, just add the path to its child "cxxomfort" folder to your compiler / project's search paths.

<verbatim>
# For most compilers, something like this works:
compiler -I /path/to/cxxomfort-release  files.cpp ...
</verbatim>

If you have the necessary permissions, you can copy or symlink the child "cxxomfort" path to one of the already existing default include paths in your system. For example, for GCC in Linux:

<verbatim>
ln -s /path/to/cxxomfort-release/cxxomfort /usr/local/include/cxxomfort
</verbatim>


<h2>Staying Updated</h2>

In order to stay updated -if you cloned the repo - all that is necessary is to clean your local copy's working directory, then issue fossil's own command to update:

<verbatim>
fossil clean
fossil update
</verbatim>

<b>For users updating from 0.45 or below:</b> You will need to perform a <code>fossil clean -x</code> before updating, and then you'll need to repoint your compiler's search path to the new cxxomfort directory, as of 0.51 onwards the file structure has changed. In case of doubts, you can also <code>fossil close</code>, delete the clone directory and repo and then download from scratch as well.

<h2>Tags</h2>

The library also includes a tags file for the <i>Geany</i> IDE (http://www.geany.org/), under the directory <code>tags/</code>. 

Simply copy the tags files to your Geany profile's tags directory - under Linux, something like <tt>~/.config/geany/tags/</tt>.

The tags file includes a number of cxxomfort constructs such as:

  *  behaviour macros like <code>CXXOMFORT_CXX_STD</code>
  *  code-generation macros like <code>CXXO_I12N_SEQ</code> and <code>CXXO_CONSTEXPR</code>
  *  library-specific functions such as <tt>seq_</tt>, <tt>type_name</tt> and <tt>to_signed/to_unsigned</tt>

Note that the tags file <b>does not mention Standard C++ names</code></b>, even the ones the library backports like <tt>nullptr</tt>. It only lists those things that are cxxomfort extensions.

For tags files covering C++ Standards, better for the user to get tags files for the C++ language and its related facilities. One such example is [https://github.com/lmachucab/geany-std.cpp.tags|this std.cpp tags].

<hr>

[1] Which is why it does not include a "Makefile", though adding one will be done eventually.

→ <b>Proceed with the [Configuration]</b>
Z 49e03f1d1ad5c7e23208df4395cacc0e