From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7a010f4eab9f18f1 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-02-17 13:11:05 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!rhein!oink.rhein.de!bnc.net!news.maz.net!pipex!howland.reston.ans.net!torn!nott!commgw!ylauriault From: ylauriault@commgw Newsgroups: comp.unix.osf.osf1 Subject: Re: Problems Linking Curses under OSF/1 Message-ID: <1995Feb17.101409.88@commgw> Date: 17 Feb 95 10:14:09 -0500 References: <3i1hei$jd2@spool.mu.edu> Organization: National Library of Canada 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 > : > : 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 - :::::::::. %% >