From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 09 Dec 2021 12:38:41 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: How to call a Windows executable from Ada? Date: Thu, 09 Dec 2021 13:38:23 -0500 Organization: IISS Elusive Unicorn Message-ID: <0jg4rgpa9nelmv7k930ao6s4pfosjkdp07@4ax.com> References: <71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: yes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-9pniJjnuYW+lWAYjl33INREt+3HFIyDmByvrtAkUXCvTNpSpu3PRNQnxT2eLFEcvSFxUn6t/xUjjXjs!Kp8lKkblqqGCAr1UqCNgxGk7GIHVEfUxk/TJ7CC1NmnGFbf5VbHyvHpgQNqn/IXe/mvR67/q X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2321 Xref: reader02.eternal-september.org comp.lang.ada:63213 List-Id: On Thu, 9 Dec 2021 01:28:59 -0800 (PST), Marius Amado-Alves declaimed the following: >Thanks all. > >Yeah, it's probably the quotation marks. I found no way around it with GNAT.OS_Lib. The quotes are needed because the names have spaces. > Have you tried /building/ those strings using character literals? Or doubled quotes... wulfraed@debian:~/Scratch$ cat stringtest.adb with Text_IO; use Text_IO; procedure stringtest is begin Put_Line("String with spaces"); Put_Line('"' & "String with spaces, delimited" & '"'); Put_Line("""String with doubled quotes"""); end stringtest; wulfraed@debian:~/Scratch$ gnatmake stringtest.adb x86_64-linux-gnu-gcc-8 -c stringtest.adb x86_64-linux-gnu-gnatbind-8 -x stringtest.ali x86_64-linux-gnu-gnatlink-8 stringtest.ali wulfraed@debian:~/Scratch$ ./stringtest String with spaces "String with spaces, delimited" "String with doubled quotes" wulfraed@debian:~/Scratch$ -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/