On 15.09.23 22:26, Blady via Gnoga-list wrote:
Le 10 sept. 2023 à 14:31, Frank Hrebabetzky <hr...@t-online.de> a écrit :
The thread "Attempt to make v2 backward compatible" addressed basically to
Gnoga developers. As end user of Gnoga (and still in the learning phase) I would like to
know how to treat the following compilation error:
Compile
[Ada] net-main.adb
net-main.adb:18:12: error: no candidate interpretations match the actuals:
net-main.adb:18:12: error: missing argument for parameter "Occurrence" in call to
"Log" declared at gnoga.ads:113
net-main.adb:18:60: error: expected private type
"Ada.Exceptions.Exception_Occurrence"
net-main.adb:18:60: error: found type "Standard.String"
net-main.adb:18:60: error: ==> in call to "Log" at gnoga.ads:110
net-main.adb:18:60: error: ==> in call to "Log" at gnoga.ads:107
uxstrings.ads:93:81: error: strings are delimited by double quote character
uxstrings.ads:93:81: error: expected type "Standard.Character"
uxstrings.ads:93:81: error: found a string type
uxstrings.ads:96:81: error: strings are delimited by double quote character
uxstrings.ads:96:81: error: expected type "Standard.Character"
uxstrings.ads:96:81: error: found a string type
uxstrings.ads:108:92: error: strings are delimited by double quote character
uxstrings.ads:108:92: error: expected type "Standard.Wide_Character"
uxstrings.ads:108:92: error: found a string type
uxstrings.ads:111:73: error: strings are delimited by double quote character
uxstrings.ads:111:73: error: expected type "Standard.Wide_Character"
uxstrings.ads:111:73: error: found a string type
gprbuild: *** compilation phase failed
The accused line 18 of net-main.adb is
Gnoga.Log (Ada.Exceptions.Exception_Name (E) & " - " &
Ada.Exceptions.Exception_Message (E));
Compiler switches are
package Compiler is
for Default_Switches ("Ada") use ("-g", "-gnata", "-gnatq", "-gnatQ");
end Compiler;
First I thought it was an error in my application, but it compiles without any
problem on another PC with Gnoga version 1. Then I thought I messed up the
installation of Gnoga version 2.1a, but various reinstallations resulted in the
same error. And when searching for help I got aware of the compatibility
problem. So what should I do?
Hello Frank,
The main change between Gnoga V1 and V2 is string encoding improvement with
Unicode strings managed by UXStrings lib.
To ease this usage a subtype has been created in gnoga.ads:
https://sourceforge.net/p/gnoga/code/ci/dev_2.1/tree/src/gnoga.ads#l46
You may change your strings with this type, see example:
https://sourceforge.net/p/gnoga/code/ci/dev_2.1/tree/test/forms.adb#l17
Concerning your error you may use the dedicated Log procedure as here:
https://sourceforge.net/p/gnoga/code/ci/dev_2.1/tree/tutorial/tutorial-03/tutorial_03.adb#l60
or the one without message:
Gnoga.Log (E);
Regards, Pascal.
https://blady.pagesperso-orange.fr
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list
Hi Pascal,
Thanks to your advice, the error messages concerning my package
net-main.adb disappeared, but the ones for uxstrings remain without any
change.
I don't know if the following has something to do with that, but
the Gnoga installation instructions contain the line
export GPR_PROJECT_PATH=/path/to/install/share/gpr:/path/to/install/lib/gnat
just that the last directory does not exist. The directories/files in
/path/to/install/lib/ are:
/components
/gnoga
/pragmarc
/uxstrings
/zanyblue
libsqlite3.a
but no /gnat.
Regards,
--
Frank Hrebabetzky, Kronach +49 / 9261 / 950 0565
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list