Web lists-archives.com

Re: ada gnat import library missing ?




On 02/11/2017 11:28, JonY wrote:
On 11/01/2017 04:07 PM, Marco Atzeri wrote:
On 31/10/2017 00:17, JonY wrote:

-2 with the appropriate import libraries should be coming along by the
end of the week if all goes well.

It is up but I see the same

$ ./hello.exe
  -bash: ./hello.exe: cannot execute binary file: Exec format error

Does it work for you ?


I think I solved the mystery, this generates a dll instead of an exe,
see the verbose output calling the compiler.


you are right; "-shared" should be used only on the 2nd step
not on the third.

$ gcc -c hello.adb

$ gnatbind -v -shared hello
gnatbind -v -shared hello
GNATBIND 6.4.0
Copyright (C) 1995-2016, Free Software Foundation, Inc.
Binding: hello.ali
No errors

$ gnatlink -v  hello

GNATLINK 6.4.0
Copyright (C) 1995-2016, Free Software Foundation, Inc.
gcc -c -mtune=generic -march=x86-64 -gnatA -gnatWb -gnatiw -gnatws /tmp/ada/b~hello.adb /usr/bin/gcc.exe b~hello.o ./hello.o -o hello.exe -L./ -L/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/adalib/ -lgnat-6 -Wl,--stack=0x2000000 -shared-libgcc

$ ./hello.exe
Hello WORLD!

$ cygcheck ./hello.exe |grep -v Windows
E:\cygwin64\tmp\ada\hello.exe
  E:\cygwin64\bin\cygwin1.dll
  E:\cygwin64\bin\cyggnat-6.dll
    E:\cygwin64\bin\cyggcc_s-seh-1.dll

Thanks
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple