Skip to content

Commit b6a11b8

Browse files
Updated the README.md and updated client.gpr
1 parent c76b0a0 commit b6a11b8

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

wrapper/Ada/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ cd obj/
7373
./tls_client_main 127.0.0.1
7474
```
7575

76+
On Windows, build the executables with:
77+
```sh
78+
gprbuild -XOS=Windows default.gpr
79+
gprbuild -XOS=Windows client.gpr
80+
```
81+
82+
7683
### GNAT FSF Compiler and GPRBuild manual installation
7784
In May 2022 AdaCore announced the end of the GNAT Community releases.
7885
Pre-built binaries for the GNAT FSF compiler and GPRBuild can be

wrapper/Ada/client.gpr

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
project Client is
2+
type OS_Kind is ("Windows", "Linux_Or_Mac");
3+
4+
OS : OS_Kind := external ("OS", "Linux_Or_Mac");
5+
26
for Languages use ("C", "Ada");
37

48
for Source_Dirs use (".",
@@ -55,8 +59,16 @@ project Client is
5559
end Compiler;
5660

5761
package Linker is
58-
for Switches ("Ada") use
59-
("-lm"); -- To include the math library (used by WolfSSL).
62+
case OS is
63+
when "Windows" =>
64+
for Switches ("Ada") use
65+
("-lm", -- To include the math library (used by WolfSSL).
66+
"-lcrypt32"); -- Needed on Windows.
67+
68+
when "Linux_Or_Mac" =>
69+
for Switches ("Ada") use
70+
("-lm"); -- To include the math library (used by WolfSSL).
71+
end case;
6072
end Linker;
6173

6274
package Binder is

wrapper/Ada/default.gpr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ project Default is
7272

7373
package Linker is
7474
case OS is
75-
when Windows =>
75+
when "Windows" =>
7676
for Switches ("Ada") use
7777
("-lm", -- To include the math library (used by WolfSSL).
7878
"-lcrypt32"); -- Needed on Windows.
7979

80-
when Linux_Or_Mac =>
80+
when "Linux_Or_Mac" =>
8181
for Switches ("Ada") use
8282
("-lm"); -- To include the math library (used by WolfSSL).
8383
end case;

0 commit comments

Comments
 (0)