home *** CD-ROM | disk | FTP | other *** search
- Path: future.dreamscape.com!dgorton
- From: dgorton@future.dreamscape.com (David Gorton)
- Newsgroups: comp.sys.amiga.programmer
- Subject: I have a Linking Question, pleas HELP!
- Date: 9 Feb 1996 14:48:58 GMT
- Organization: Dreamscape Online
- Message-ID: <4ffmsq$r7f@saturn.dreamscape.com>
- NNTP-Posting-Host: future.dreamscape.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hello, I have a question, I am new to C programming and I am
- having a problem with SAS/C. First of all I can aready tell
- that SAS/C is quite powerful, compaired to the clone C compilers
- at school. The school is using Quick C and the book I am using
- needs a particular file for almost every program that we will
- be doing. The problem is I can't figure out how to use that file
- with the Amiga SAS/C program.
-
- First let me give one of the programs, we are testing, and then
- I will try and explain my problem has clearly has possible!
-
-
- /*
- File: add2f.c
- --------------
-
- This program reads in two floating point numbers, adds them
- together, and prints their sum.
- */
-
- #include <stdio.h>
- #include "genlib.h"
- #include "simpio.h"
-
- main()
- {
- double n1, n2, total;
-
- printf ("This program adds two floating-point numbers.\n");
- printf("1st number? ");
- n1 = GetReal();
- printf("2nd number? ");
- n2 = GetReal();
- total = n1 + n2;
- printf( "The total is %g\n", total);
- }
-
-
-
- OK this file has in it two non standard #include header files.
- In order to use them I have to like them to a file called
- roberts.lib. AT school you must created a "mak" file.
-
- All I do is LINK it by setting the program list.
- example go into the File menu and hit L for List
- this brings up a screen that wants me to key in some info
- I then key in the MAK file name add2f.mak ENTER, and create it
- Then I key in the program name add2f.c ENTER and finally I would
- key in roberts.lib Enter and Save it.
-
- My question is how can I get that .C program to use the roberts.lib
- for those undefined include files? Thanks, hope someone can help
- I really rather be in from of my amiga doing most of the homework
- than one of the clones!
-