jtreworgy@eagle.wesleyan.edu (03/14/91)
Hello.. Can anyone offer any help or advice or detailed sets of instructions on how to install the PDC compiler OR the NorthC compiler??? I have had PDC for a long time and have spend God knows how many hours trying to get it to compiler a program (never can get it to recognize libraries and/or includes). It always comes up with things like "unknown symbol _printf"or whatever I was trying to do. I have the Amiga developer's disks with amiga.lib and all, I just don't know what to do with the files. As for NorthC, the damn thing is SUPPOSED to work by itself... it comes with very explicit instructions for creating programs, and I get the same old yarn about _printf (after some messing around I got it to work until the linker but then it complained about _main). I am sorry if this seems vague. I obviously haven't done much amiga programming but I've done plenty of C programming on other machines and would love to get either one of the beasties working, and am getting very frustrated with how the instructions for both these programs make it look reeeal easy yet I can't even make either one give me the time of day. (figuratively). Any help would be very much appreciated.... As for PDC, I got it from FTP; I tried to buy the original disks from the author on two different occasions but once my letter was returned, the next time I didn't get it back (don't remember if the check was cashed or not) but I never got any program in the mail either... I don't know if there is any advantage to having the original distribution disks over the archives I got but point is moot anyway. Thanks, -- James A. Treworgy -- No quote here for insurance reasons -- jtreworgy@eagle.wesleyan.edu jtreworgy@WESLEYAN.BITNET
Michael_Kelly@61ssc1.ceo.dg.com (03/14/91)
I don't have any experience with PDC but I did get NorthC and ran into similar problems. The problem stems from the fact that NorthC does not flag symbols (like _printf for example) as external references when it creates the .s file. There is however, an easy fix for this (which did take me a while to find though). If you call a68k with a -g switch on the command line, eg: a68k -g -ohello.o hello.s this causes a68k to treat all undefined symbols as global and it doesn't flag any errors. It is then up to Blink to sort it all out. Hope this helps, Michael. michael@61ssc1.ceo.dg.com I speak for myself. My company employs other people to speak on its behalf. I can't afford to do that!
petersen@sp66.csrd.uiuc.edu (Paul Petersen) (03/15/91)
As far as I know the most recent version of PDC that has been released is 3.33 on ux1.cso.uiuc.edu:amiga/misc/PDC. It should be relatively trivial to compile the programs. PDC comes in three archives. You should get all three and de-zoo (x//) them each on separate floppies or in separate directories on the hard-disk. PDC currently requires AmigaDOS 1.3 If you have de-zooed the pdc-program.zoo file into the directory dh0:PDC-3.33, then 1> cd dh0:PDC-3.33 2> execute s/start 3> path add PDC:bin 4> cd sample 5> ccx hello.c 6> hello Please read the documentation about Using_PDC and the Release_Notes. These instructions are really only approximate as I do not have my amiga in front of me at this moment. If they do not work, please try to report why, and maybe I can figure out what went wrong. PDC has LOTS of bugs/differences from K&R and ANSI C. However it works most of the time, is free and includes ALL source code. If you want to make it better, be my guest. ... Use the source Luke ... --------------------------- FILE: s/start ------------------------------------ ; This script is meant to be run from the top of your PDC directory hierarchy. ; It will set the necessary environment variables and will assign the logical ; device "pdc:" to a common point for referencing PDC-related files. ; assign pdc: "" setenv PDCLibs "PDC.Lib; Amiga.lib; Math.lib" setenv PDCLibDirs "PDC:lib" setenv PDCIncDirs "PDC:include" ------------------------------------------------------------------------------ Due to changes since the release Lionel and I do not have as much time available to do snail-mail distributions of PDC. There is no guarantee that any requests received will be processed in a timely manner, so it might be better NOT to ask for PDC by mail. However, it is still available by anonymous FTP. --------------------------- FILE: Using_PDC ---------------------------------- README - Some remarks and words of advice on using PDC ------------------------------------------------------ The major pieces of this distribution are the compiler (PDC), the assembler (A68k), the linker (BLink), and the libraries and header files. Tying everything together is a "front-end" program (CCX), which takes care of a lot of the drudgery behind creating an executable program. Things to do before invoking CCX -------------------------------- CCX requires that the following environment variables be set: PDCLibs - Lists the libraries with which to link PDCLibDirs - Lists the directories to search for libraries PDCIncDirs - Lists the directories to search for include files Multiple entries for an environment variable are delimited by semicolons. See the file s/start on this disk and the documentation to CCX in the doc directory on this disk for examples of how to use the environment variables. As for your search path, at the very least you ought to have in it the directory containg CCX, PDC, A68k, and BLink. This is necessary if you plan to use CCX. Stack size for running PDC should be above the CLI's default of 4K. 20000 bytes is the lowest recommended size. 32000 bytes is sufficient for most things, up to and including recompiling PDC and its libraries. To be safe, it is best to set a good large stack size in your startup-sequence, because forgetting later on usually results in a visit from the Guru. Should PDC ever guru on you, the first step to take is bump up the stack. In summary: - Set the environment variables PDCLibs, PDCLibDirs, and PDCIncDirs. - CCX requires that PDC, A68k, and Blink be in your search path. - PDC needs a MINIMUM of 20K of stack space to run safely. Headers, Libraries, and Startup code ------------------------------------ Standard C headers can be found in the directory "include" on this disk. See below for more information on Amiga-specific headers. The PDC Software Distribution includes the three library files necessary to compile programs written for the Amiga. Here are some short descriptions of them: * Amiga.lib Amiga.lib contains the hundreds of assembly language stubs, or "stub-routines", that allow programs written in C to call the Amiga's standard set of shared libraries. It also contains a few functions to aid in the construction and destruction of some common entities (eg, CreateTask, DeletePort, NewList, etc.). The version of Amiga.lib included with PDC can be built automatically by invoking the makefile contained in the "lib/src" directory on this disk and providing your Workbench 1.3 Extras disk. * PDC.lib: PDC.lib contains a large subset of the ANSI C functions, as well as some runtime support functions and other extensions. A (currently, partial) list of the functions provided in PDC.lib and Math.lib can be found in the file MANIFEST in the LibSrc directory on the Libs and Utils disk. * Math.lib: Math.lib contains library and runtime support functions for performing floating point math. Currently, PDC supports only IEEE double precision math via the Amiga's shared libraries, ieeedoubbas.library and ieeedoubtrans.library. As you may realize, this default requires that Workbench 1.3 be available at runtime in order use the transcendental functions. The source code for the transcendental functions is provided, though, if you care to use it. Most programs written specifically for the Amiga, including much source code to this distribution, require the Amiga header files in order to compile. Those who also own one of the commercial C compilers can generally get away with using the headers that come with those compilers [1]. In any case, I recommend that you obtain the Native Developer Update (NDU) from Commodore-Amiga Technical Support (CATS). The NDU includes commented and stripped versions of the Amiga C and assembly language headers, the fabled Autodocs, a healthy batch of README files, and Commodore's standard libraries and utilities. Altogether, you get four disks for US$20; an excellent deal. -- University of Illinois, Urbana-Champaign Center for Supercomputing Research and Development UUCP: {uunet,convex}!uiucuxc!uicsrd!petersen INTERNET: petersen@uicsrd.csrd.uiuc.edu
GKZ117@uriacc.uri.edu (F. Michael Theilig) (03/15/91)
On 14 Mar 91 02:02:58 GMT <jtreworgy@eagle.wesleyan.edu> said: >Hello.. Can anyone offer any help or advice or detailed sets of instructions on >how to install the PDC compiler OR the NorthC compiler??? I have had PDC for a >long time and have spend God knows how many hours trying to get it to compiler >a program (never can get it to recognize libraries and/or includes). You must set a global variable to point to the include directory. I can't be too sure how any one does it exactly, but DICE, PDC, NorthC and Sozobon C all put their includes in a directory called INCLUDE and you must do something like SET INCLUDE VOLUME:INCLUDE/ or something similar. The latest version of NorthC has adequate instructions on how to set it up. > It always >comes up with things like "unknown symbol _printf"or whatever I was trying to >do. I have the Amiga developer's disks with amiga.lib and all, I just don't >know what to do with the files. > Some versions of some cc front ends don't like the ARP shell. Try compiling it "by hand". If BLink is yelling at you, you might also have to set up your libs directory similarly to the includes. >As for NorthC, the damn thing is SUPPOSED to work by itself... it comes with >very explicit instructions for creating programs, and I get the same old >yarn about _printf (after some messing around I got it to work until the linker >but then it complained about _main). I have gotten NorthC to work, but you must use A68k's -g option, as someone else suggested. > >I am sorry if this seems vague. I obviously haven't done much amiga programming >but I've done plenty of C programming on other machines and would love to get >either one of the beasties working, and am getting very frustrated with how >the instructions for both these programs make it look reeeal easy yet I can't >even make either one give me the time of day. (figuratively). Any help would be >very much appreciated.... [Muncha-Muncha] When starting programming on the Amiga with PD compilers, patience is your most valuable commodity. >-- >James A. Treworgy -- No quote here for insurance reasons -- >jtreworgy@eagle.wesleyan.edu jtreworgy@WESLEYAN.BITNET -------- F. Michael Theilig - The University of Rhode Island at Little Rest GKZ117 at URIACC.Bitnet GKZ117 at URIACC.URI.edu Though you'd like to know.
dillon@overload.Berkeley.CA.US (Matthew Dillon) (03/16/91)
In article <47617@nigel.ee.udel.edu> GKZ117@uriacc.uri.edu (F. Michael Theilig) writes: >On 14 Mar 91 02:02:58 GMT <jtreworgy@eagle.wesleyan.edu> said: >>Hello.. Can anyone offer any help or advice or detailed sets of instructions on >>how to install the PDC compiler OR the NorthC compiler??? I have had PDC for a >>long time and have spend God knows how many hours trying to get it to compiler >>a program (never can get it to recognize libraries and/or includes). > > You must set a global variable to point to the include directory. I > can't be too sure how any one does it exactly, but DICE, PDC, NorthC and > Sozobon C all put their includes in a directory called INCLUDE and you > must do something like SET INCLUDE VOLUME:INCLUDE/ or something similar. > The latest version of NorthC has adequate instructions on how to set it up. DICE sticks its includes in DINCLUDE: .. the amiga includes are in a subdirectory depending on the OS, DINCLUDE:AMIGA20/ or DINCLUDE:AMIGA13/ while top level includes like stdio.h are just in DINCLUDE:, as in DINCLUDE:stdio.h For DICE, at least, DLIB: points to the link libraries, DINCLUDE: to the includes, and there is one enviroment variables called DCCOPTS (setenv DCCOPTS <options>) -Matt >>James A. Treworgy -- No quote here for insurance reasons -- >>jtreworgy@eagle.wesleyan.edu jtreworgy@WESLEYAN.BITNET > >-------- > F. Michael Theilig - The University of Rhode Island at Little Rest > GKZ117 at URIACC.Bitnet > GKZ117 at URIACC.URI.edu Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA