comp.lang.ada
 help / color / mirror / Atom feed
From: George J <ivanov_george@list.ru>
Subject: Re: Ada, Windows x64 building
Date: Fri, 2 Jun 2017 22:27:26 -0700 (PDT)
Date: 2017-06-02T22:27:26-07:00	[thread overview]
Message-ID: <8f919c42-771a-4137-aa4c-16e9da213978@googlegroups.com> (raw)
In-Reply-To: <d9e7c09c-54c6-450a-b77a-e1893fee7a75@googlegroups.com>

[SOLVED]
So,thanks to Alex,yesterday i began trying in building x64 app in Windows with GNAT GPS. So i found solution. If any interested in it, there is some steps (according to this article (rus) http://www.ada-ru.org/start)
1. download and install msys2 from http://www.msys2.org/
2. run x64 msys shell and install ada compiler : 
pacman -S mingw-w64-x86_64-gcc-ada
2.1 if you want x64 gdb debugger :
pacman -S mingw-w64-x86_64-gdb
3. there are some other components to install :
pacman -S mingw-w64-x86_64-gprbuild-gpl
pacman -S mingw-w64-x86_64-aws
pacman -S mingw-w64-x86_64-asis
pacman -S mingw-w64-x86_64-matreshka

after that you have to set environment variable PATH to the destination "\mingw64\bin" (for example C:\msys64\mingw64\bin), because gnat1.exe need libraries from there. And reboot, sometime it necessary;)

then you have to find file toolchains.py in your gnat directory (ex. : C:\GNAT\2016\share\gps\support\core )
and add toolchain for the x64 building as in this example:
  <toolchain name="gnat_x64">
	<gnat_driver>C:\msys64\mingw64\bin\gnat</gnat_driver>
	<gnat_list>C:\msys64\mingw64\bin\gnatls</gnat_list>
	<debugger>C:\msys64\mingw64\bin\gdb</debugger>
	<cpp_filt>c++filt</cpp_filt>
	<compiler lang="ada">C:\msys64\mingw64\bin\gnatmake</compiler>
    <compiler lang="c">C:\msys64\mingw64\bin\gcc</compiler>
    <compiler lang="c++">C:\msys64\mingw64\bin\g++</compiler>
    <compiler lang="asm">C:\msys64\mingw64\bin\gcc</compiler>
  </toolchain>
of course you have to paste your own paths.

Then you create your project or open current with GNAT GPS. Go to Project->Properties->Toolchain, press "Add", open combobox and find your new toolchain (for ex. gnat_x64). When your checked it, make it active and check if paths right (GNAT Driver, GNAT List, Debugger, Compilers.. all must destinate to your x64 mingw paths as you have set in toolchains.py)

after this you can set -m64 flag, or not set, as you wish. If you run debug mode and make Debug->Data->Display Registers you'll see x64 registers.
All done.


      reply	other threads:[~2017-06-03  5:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05  4:30 Ada, Windows x64 building George J
2017-05-31 22:54 ` alby.gamper
2017-06-02  8:19   ` George J
2017-06-03  5:27     ` George J [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox