general.xml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <chapter xml:id="general-structure">
  2. <title>General structure and usage</title>
  3. <p>The topmost structural units of the library are headers and the library file
  4. (or archive) - <tt>lib__vic.a</tt> or <tt>__vic.lib</tt>. Usually the library
  5. file has some suffix like <tt>lib__vic14.a</tt>. All the headers
  6. are located in the <tt>__vic/</tt> subdirectory. One should include them like
  7. this:</p>
  8. <code-block lang="C++">
  9. #include &lt;__vic/<nt>header.h</nt>>
  10. </code-block>
  11. <p>Where <tt><nt>header.h</nt></tt> is a name of the desired header.</p>
  12. <p>Almost all the code is placed within <tt>__vic</tt> namespace, including
  13. other namespaces.</p>
  14. <p>During program linking, the library file must be given to the linker.
  15. Example:</p>
  16. <tty>
  17. $ g++ -std=c++14 prog.cpp -l__vic14
  18. </tty>
  19. <p>The library can be built using one of the ISO C++ standards: C++98, C++11,
  20. C++14, C++17, C++20 or C++23. The standard suffix is used as a suffix for the
  21. library file (archive).</p>
  22. <p>Some features require a specific minimal standard version to be available,
  23. e.g. many of them require at least C++11. These features are marked with
  24. <sign>C++11</sign> sign that means "C++11 or later".</p>
  25. <p>Some features are available only in particular standard mode and not
  26. available otherwise. Such features are marked with <sign>C++98 only</sign>
  27. sign.</p>
  28. <p>Detailed description of the library components is provided in the subsequent
  29. chapters. Descriptions are grouped by headers. C++23 language syntax is mainly
  30. used as a more complete and expressive one.</p>
  31. </chapter>