comp.lang.ada
 help / color / mirror / Atom feed
* ncurses problem
@ 2003-05-27 13:26 domin
  2003-05-27 13:29 ` Vinzent Hoefler
  2003-05-27 14:18 ` Preben Randhol
  0 siblings, 2 replies; 4+ messages in thread
From: domin @ 2003-05-27 13:26 UTC (permalink / raw)


Hello. I'm beginner to Ada, I'm using GNAT on linux.
Recently I have installed also AdaCurses-5.2-2 + runtime from rpm,
but I can't make any program that uses it - compile is ok, but link fails:

For example, attempt to make the hello2.adb:

with Terminal_Interface.Curses;
procedure Hello2 is
pytanie: string := "Czy to dzia�a?";
begin
   Terminal_Interface.Curses.Init_Screen;
null;
end Hello2;

returns the following error:

bash-2.05b$ gnatmake hello2.adb
gnatgcc -c hello2.adb
gnatbind -x hello2.ali
gnatlink hello2.ali
b~hello2.o: In function `adainit':
b~hello2.o(.text+0x80): undefined reference to
`terminal_interface__curses___elabs'
./hello2.o: In function `_ada_hello2':
./hello2.o(.text+0x25): undefined reference to
`terminal_interface__curses__init_screen'
gnatmake: *** link failed.

Does anyone know what can be wrong or what to do?
Thanks in advance.

-- 
domin
________________________________________________________________
"the things you own - own you" (c)papa roach



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

* Re: ncurses problem
  2003-05-27 13:26 ncurses problem domin
@ 2003-05-27 13:29 ` Vinzent Hoefler
  2003-05-27 14:18 ` Preben Randhol
  1 sibling, 0 replies; 4+ messages in thread
From: Vinzent Hoefler @ 2003-05-27 13:29 UTC (permalink / raw)


domin wrote:

>bash-2.05b$ gnatmake hello2.adb
>gnatgcc -c hello2.adb
>gnatbind -x hello2.ali
>gnatlink hello2.ali
>b~hello2.o: In function `adainit':
>b~hello2.o(.text+0x80): undefined reference to
>`terminal_interface__curses___elabs'

You have to specify where gnatlink can find the ncurses library. Look
for the -I command line switch.


Vinzent.



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

* Re: ncurses problem
  2003-05-27 13:26 ncurses problem domin
  2003-05-27 13:29 ` Vinzent Hoefler
@ 2003-05-27 14:18 ` Preben Randhol
  2003-05-27 14:28   ` domin
  1 sibling, 1 reply; 4+ messages in thread
From: Preben Randhol @ 2003-05-27 14:18 UTC (permalink / raw)


domin wrote:
> Hello. I'm beginner to Ada, I'm using GNAT on linux.
> Recently I have installed also AdaCurses-5.2-2 + runtime from rpm,
> but I can't make any program that uses it - compile is ok, but link fails:
> 
[..]

> Does anyone know what can be wrong or what to do?

Do:

gnatmake hello2 `adacurses-config`

now the linker will get the information it needs.

PS: Note that the "`" must not be "'".

-- 
Preben Randhol                    http://www.pvv.org/~randhol/



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

* Re: ncurses problem
  2003-05-27 14:18 ` Preben Randhol
@ 2003-05-27 14:28   ` domin
  0 siblings, 0 replies; 4+ messages in thread
From: domin @ 2003-05-27 14:28 UTC (permalink / raw)


Preben Randhol wrote:
> gnatmake hello2 `adacurses-config`

It worked, thank you :-)
-- 
domin
________________________________________________________________
"the things you own - own you" (c)papa roach



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

end of thread, other threads:[~2003-05-27 14:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-27 13:26 ncurses problem domin
2003-05-27 13:29 ` Vinzent Hoefler
2003-05-27 14:18 ` Preben Randhol
2003-05-27 14:28   ` domin

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