* Problems Linking Curses under OSF/1
@ 1995-02-17 6:58 Peter L. Buschman
1995-02-17 12:17 ` Charles M Richmond
1995-02-17 15:14 ` ylauriault
0 siblings, 2 replies; 3+ messages in thread
From: Peter L. Buschman @ 1995-02-17 6:58 UTC (permalink / raw)
I'm sure this problem has an utterly simple fix, but I'm at a loss.
I'm trying to program using the curses library. Under a VMS system,
the following program compiles just fine, but on the OSF/1 system,
I get linker errors.
Can anyone help me with this?
The program is: (minimal curses program)
: #include <curses.h>
:
: main()
: {
: initscr();
: box(stdscr,'%','%');
: refresh();
: }
And when compiling, the errors are:
: ld:
: Unresolved:
: initscr
: box
: stdscr
: wrefresh
--
%%
:. __________ _______ _________ %% 97buschmanp@alma.edu
:::. | || | \ | || | || \ %% (|) |\/| /\
:::::. | ||_|_/ | || | ||--< %% :. .--.
:::::::. _|__||_ _|__||___| _|__||__/ %% :::. `--.infonia!
:::::::::. %%%%%%%:.`--' %%%%%%%%%%%%
:::::::::::. Peter L. Buschman, Alma College :::::::. %%
:::::::::::::. - Computer Science Major - :::::::::. %%
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems Linking Curses under OSF/1
1995-02-17 6:58 Problems Linking Curses under OSF/1 Peter L. Buschman
@ 1995-02-17 12:17 ` Charles M Richmond
1995-02-17 15:14 ` ylauriault
1 sibling, 0 replies; 3+ messages in thread
From: Charles M Richmond @ 1995-02-17 12:17 UTC (permalink / raw)
stevax@vinny.csd.mu.edu (Peter L. Buschman) writes:
>I'm sure this problem has an utterly simple fix, but I'm at a loss.
>I'm trying to program using the curses library. Under a VMS system,
>the following program compiles just fine, but on the OSF/1 system,
>I get linker errors.
>Can anyone help me with this?
>The program is: (minimal curses program)
>: #include <curses.h>
>:
>: main()
>: {
>: initscr();
>: box(stdscr,'%','%');
>: refresh();
>: }
>And when compiling, the errors are:
>: ld:
>: Unresolved:
>: initscr
>: box
>: stdscr
>: wrefresh
You need to add -lcurses to your compile line inorder to include the curses
library. See the man pages for 'cc' and 'ld'.
Charlie
PS for more complex programs you may need to add -ltermcap (if you are using
termcap).
--
*****************************************************************************
* Charles Richmond Integrated International Systems Corporation *
* cmr@asoko.iisc.com cmr@world.std.com *
* Specializing in UNIX, X, Image Processing, and Communications. *
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems Linking Curses under OSF/1
1995-02-17 6:58 Problems Linking Curses under OSF/1 Peter L. Buschman
1995-02-17 12:17 ` Charles M Richmond
@ 1995-02-17 15:14 ` ylauriault
1 sibling, 0 replies; 3+ messages in thread
From: ylauriault @ 1995-02-17 15:14 UTC (permalink / raw)
In article <3i1hei$jd2@spool.mu.edu>, stevax@vinny.csd.mu.edu (Peter L. Buschman) writes:
> I'm sure this problem has an utterly simple fix, but I'm at a loss.
> I'm trying to program using the curses library. Under a VMS system,
> the following program compiles just fine, but on the OSF/1 system,
> I get linker errors.
>
> Can anyone help me with this?
>
> The program is: (minimal curses program)
>
> : #include <curses.h>
> :
> : main()
> : {
> : initscr();
> : box(stdscr,'%','%');
> : refresh();
> : }
>
> And when compiling, the errors are:
>
> : ld:
> : Unresolved:
> : initscr
> : box
> : stdscr
> : wrefresh
You need to include the 'curses' when you link evertyhing together.
Use the following on your 'cc' command:
cc prog.c -o prog -lcurses
This causes the 'loader' to look for external references into
libcurses.a
Read the MAN page on cc for more info.
Yvon Lauriault
National Library of Canada
E-Mail: Yvon.Lauriault@nlc-bnc.ca
>
>
> --
> %%
> :. __________ _______ _________ %% 97buschmanp@alma.edu
> :::. | || | \ | || | || \ %% (|) |\/| /\
> :::::. | ||_|_/ | || | ||--< %% :. .--.
> :::::::. _|__||_ _|__||___| _|__||__/ %% :::. `--.infonia!
> :::::::::. %%%%%%%:.`--' %%%%%%%%%%%%
> :::::::::::. Peter L. Buschman, Alma College :::::::. %%
> :::::::::::::. - Computer Science Major - :::::::::. %%
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-02-17 15:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-02-17 6:58 Problems Linking Curses under OSF/1 Peter L. Buschman
1995-02-17 12:17 ` Charles M Richmond
1995-02-17 15:14 ` ylauriault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox