CompuServe Messages

#zc libs & linking

    24-Jun-90 15:29:14
Sb: #109821-#zc libs & linking
Fm: Mike Spille/Manx 71545,1466
To: Aaron Minner 72561,3304
"a run-down of the basic assumtions that one requires before programming the Amiga" Wow, that's quite a bit of information. The Amiga environment is much more powerful than that on Clones. This means all sorts of nifty things can be done w/ an Amiga that would be difficult or impossible on PCs. The bad part is that powerful=complex. There's alot to learn, especially for programmers, and as you say you've got a significant handicap in that you're not using a commercial compiler. OK, well the basic things you're going to run into are: Header files, C source files, link-libraries, and resident libraries. Header files are files which get included into C-source using the C #include directive. There's two basic types of these – standard C includes and the Amiga #includes. The C includes are things like stdio.h, etc. which are portable across all C compilers. The Amiga #includes are things like intuition.h etc. which are specifically for doing Amiga stuff. You should be able to get the Amiga includes w/ the 1.3 Developer's kit from Commodore. These header files are standard across all Amiga C compilers. C source files are your actual programs, like 'hello.c' for a hello-world type program. Not much else to 'em. Link-libraries are libraries that get put into your program's executable file. The types of things you find in link libraries are program startup code, standard C functions like 'strcpy()', and 'glue' routines which are hooks into resident libraries. Resident libraries are libraries that are shared by all programs running on the machine. They are not part of your program's executable, but rather get loaded into memory through an OpenLibrary() call from a program. Object modules (fergot to include them above) are the intermediate files created by compilers and assemblers. To get them into executable programs you've got to link them first with one or more libraries. Header files generally end in '.h', C source in '.c', object modules in '.o' or '.obj', link-libraries in '.lib', and resident libraries in '.library'. These aren't hard-and-fast rules, but are the most widely used exte(CONT)