Changes between Version 2 and Version 3 of WritingCompliantLibraries


Ignore:
Timestamp:
2013-06-11T06:08:46Z (12 years ago)
Author:
Martin Sjölund
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WritingCompliantLibraries

    v2 v3  
    88Make sure that the library is encoded in UTF-8 or 7-bit ASCII. It is not UTF-8 encoded if OpenModelica says:
    99> Error: The file was not encoded in UTF-8
    10 To solve this, convert the files to UTF-8, or manually modify the sources. To automatically convert all sources if you know the current encoding you can use this (Linux only) :
     10To solve this, convert the files to UTF-8, or manually modify the sources. To manually change the encoding of a file, open it in a text editor (such as pluma or Notepad++) and make sure each character looks the way it should, then save as UTF-8 text. To automatically convert all sources if you know the current encoding you can use this (Unix only):
    1111{{{
    1212find $(SOURCE_DIRS) -regextype posix-egrep -regex '.*\.(cpp|c|h|mo|tpl)$$' -exec bash -c "iconv -f UTF-8 -t UTF-8 '{}' -o /dev/null 2>tmp || (rm -f tmp && cp '{}' tmp && iconv -f ISO-8859-1 -t UTF-8 tmp -o '{}' && echo Converted {} to UTF-8)" ';'
    1313}}}
    14 To manually convert to 7-bit ASCII (as used by the MSL), use HTML entities. For example: `"°C"` becomes `"<html>&deg;C</html>"` and `<html>Linköping</html>` becomes `<html>Link&ouml;ping</html>`
     14To manually convert to 7-bit ASCII (as used by the MSL), use HTML entities. For example: `"°C"` becomes `"<html>&deg;C</html>"` and `<html>Linköping</html>` becomes `<html>Link&ouml;ping</html>`.
     15
     16=== Wrong package.order ===
     17
     18When in doubt, remove all package.order files. If they are present, they must follow a certain structure. OpenModelica will give nice warnings about what is missing or superfluous. Sometimes, these errors are due to Modelica being case-sensitive.
    1519
    1620=== Modelica is case-sensitive ===
     
    2529To automatically add within-clauses to a library, there exists a utility in our [https://openmodelica.org/git/OpenModelicaLibraries.git git] repository: addMissingWithin.sh.
    2630
    27 === Common parsing errors ===
     31=== Incorrect floating point numbers ===
    2832
    2933> Warning: Treating .5 as 0.5. This is not standard Modelica and only done for compatibility with old code. Support for this feature may be removed in the future.