comp.lang.ada
 help / color / mirror / Atom feed
* Ada newbie: GNAT linking error question
@ 2003-05-11 14:29 Sascha Wilde
  2003-05-11 18:05 ` Martin Krischik
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sascha Wilde @ 2003-05-11 14:29 UTC (permalink / raw)


I just tried to build the tetris example from

http://www.tc.umn.edu/~puk/tetris.txt

but the build fails during linking, saying:

    gnatlink tetris.ali
    b~tetris.o: In function `main':
    b~tetris.o(.text+0x489): undefined reference to `_ada_tetris'
    collect2: ld returned 1 exit status
    gnatlink: cannot call /usr/local/bin/gcc
    gnatmake: *** link failed.

Thirst I thought that might be caused by the fact that I used the gnat
compiler from gcc-3.2.3, so I tried the precompiled gnat-3.15p from
act, but it produced just the same error.  I checked it alsow on my
notebook, running debian-woody with gnat-14p the same result.
So my question is: what went wrong?

I'm not shure if this is here quite on-topic, because it might be more
a gnat than a Ada problem.  Please tell me if I'm OT here.
-- 
Sascha Wilde
    "Liebet eure Feinde, vielleicht schadet das ihrem Ruf" 
    (Stanislaw Jerzy Lec)



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: Ada newbie: GNAT linking error question
@ 2003-05-12  8:59 Gautier direct_replies_not_read
  0 siblings, 0 replies; 7+ messages in thread
From: Gautier direct_replies_not_read @ 2003-05-12  8:59 UTC (permalink / raw)
  To: comp.lang.ada

You surely have two or more overlapping GCCs.
On GNAT 3.15p/Win32 you obtain

C:\Temp>gnatchop tt.txt
splitting tt.txt into:
   screen.ads
   arrival.adb
   arrival.ads
   bricks.adb
   bricks.ads
   screen.adb
   tetris.adb
   wall.adb
   wall.ads
   wtetris.ads
   tetris.ads
   win_get_immediate.ads
   win_get_immediate.adb
   dtetris.ads
   atetris.ads
   dos_get_immediate.ads
   dos_get_immediate.adb
   openada_get_immediate.adb
   openada_get_immediate.ads
   otetris.ads

C:\Temp>gnatmake wtetris
gcc -c wtetris.ads
gcc -c tetris.adb
gcc -c win_get_immediate.adb
gcc -c arrival.adb
gcc -c bricks.adb
gcc -c screen.adb
gcc -c wall.adb
gnatbind -x wtetris.ali
gnatlink wtetris.ali

C:\Temp>
________________________________________________________
Gautier  --  http://www.mysunrise.ch/users/gdm/gsoft.htm

NB: For a direct answer, e-mail address on the Web site!

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-05-12 18:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-11 14:29 Ada newbie: GNAT linking error question Sascha Wilde
2003-05-11 18:05 ` Martin Krischik
2003-05-11 20:14   ` Sascha Wilde
2003-05-12  7:29 ` Frank Piron
2003-05-12  8:52 ` Preben Randhol
2003-05-12 18:34   ` Sascha Wilde
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12  8:59 Gautier direct_replies_not_read

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