Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Interfacing C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Interfacing C
>  When I implement the Advanced example with callbacks given in the OCaml
> manual (Pg 184-185), I am getting the following errors while building the
> final executable.
> $cc -o prog main.c mod.a mod.a(terminfo.o): In function `terminfo_setup':
> terminfo.o(.text+0x22): undefined reference to `tgetent'
> mod.a(terminfo.o)(.text+0xcf): more undefined references to `tgetstr'
> follow mod.a(terminfo.o): In function `terminfo_backup':
> terminfo.o(.text+0x186): undefined reference to `tputs'
> mod.a(terminfo.o): In function `terminfo_standout':
> Can anyone please help me out??

Try adding -lcurses or -ltermcap or -lcurses -ltermcap (depends on
your system) at the end of the cc command line.

- Xavier Leroy