Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ttrdc.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!mgnetp!ltuxa!ttrdc!kad From: kad@ttrdc.UUCP (Keith Drescher) Newsgroups: net.micro.att Subject: Re: How do you access the PC7300 modem? Message-ID: <267@ttrdc.UUCP> Date: Fri, 12-Jul-85 09:18:03 EDT Article-I.D.: ttrdc.267 Posted: Fri Jul 12 09:18:03 1985 Date-Received: Sat, 13-Jul-85 14:29:29 EDT References: <266@ttrdc.UUCP> <1279@eagle.UUCP> Reply-To: kad@ttrdc.UUCP (Keith Drescher) Organization: AT&T Teletype Corp., Skokie, Ill. Lines: 65 Summary: >> Does anyone out there have any idea how to use dial(3) on the >> PC7300? I've tried, but I get a message about three routines >> (tgetnum, tgetent, tget...). These routines are present in >> libtermcap and libtermlib, but the problem seems to be that they >> are not defined to dial in libc, because the error comes from >> libc. >> >> Keith Drescher (kad@ttrdc) > >If the dial routine refers to the mentioned routines in libtermlib, then you >must include "-ltermlib" in whatever command you use to load your program >(i.e., cc or ld). >-- > Marty Shannon >UUCP: ihnp4!eagle!mjs >Phone: +1 201 522 6063 Unfortunately, that doesn't work. I posted to the net because loading via 'cc -o prog prog.c -ltermlib' didn't solve the problem, which I thought was strange (it is strange). However, James Blasius of AT&T Indian Hill solved the problem. For any of you interested, here's how to compile something which uses dial: Answer: use 'cc -c prog.c' 'ld -o prog prog.o /lib/shlib.ifile /lib/crt0s.o [other libs]' note: [other libs] CAN NOT include libc.a or the problem occurs. Not being able to use any of the libc stuff is nasty, but you can get around that as follows: main.c - the main program ddial.c - another file which only contains a call to dial ex: #includeddial() { extern struct CALL call; int i; i=dial(&call); /*Note that although the doc. for dial says that */ return (i); /*you need a pointer to a structure, you must send */ } /*the actual structure address. Thanks to James */ /* Blasius for this info also. */ cc -c main.c ddial.c ld -r -o dd.o ddial.o /lib/shlib.ifile /lib/crt0s.o ld -o name main.o dd.o -lc [other libs] Hope this helps somebody somewhere. Send me mail if you want info on using ioctl to dial, but don't ask me how to connect the modem to the line after that!. -- ------------------------------------------------------------------------- ____________ _ (___________/ ====<_>==== // Keith Drescher (kad@ttrdc) \_\__//____ >__________/ PATH: ...!ihnp4!ttrdc!kad ------------------------------------------------------------------------- Standard Disclaimer: The views presented here are not those of my employer, my family, or myself. -------------------------------------------------------------------------