aries@rhi.hi.is (Mimir Reynisson) (12/24/90)
What on earth am I doing wrong in the following test programme??
The compiler says it all fine and dandy, but it won't link.
#include <stdio.h>
#include <ctype.h>
main()
{
if (isalpha('a'))
printf("say something");
else printf("say something else");
}
The linker chokes on it and spits out the following error message:
### Link: Error: Undefined entry, name: (Error 28) "__p_CType"
Referenced from: main in file: test.c.o
### Link: Errors prevented normal completion.
The current solution to this problem is to #undef all these
macros that use the __p_CType array, but my question is where is
this array defined??? Or do I have to do it myself???
Here is the link I used:
Link -w -c 'MPS ' -t MPST test.c.o
-sn STDIO=Main
-sn INTENV=Main
-sn %A5Init=Main
"{Libraries}"Stubs.o
"{CLibraries}"CRuntime.o
"{CLibraries}"StdCLib.o
"{CLibraries}"CInterface.o
"{Libraries}"Interface.o
"{Libraries}"ToolLibs.o
-o test
It's getting to be a bit annoying ...
// Mimir Reynisson
// Software Island (aries@rhi.hi.is)
eastman@csa2.lbl.gov (JACK EASTMAN) (12/26/90)
In article <2569@krafla.rhi.hi.is>, aries@rhi.hi.is (Mimir Reynisson) writes... > >What on earth am I doing wrong in the following test programme?? >The compiler says it all fine and dandy, but it won't link. > >#include <stdio.h> >#include <ctype.h> > >main() >{ > if (isalpha('a')) > printf("say something"); > else printf("say something else"); >} > >The linker chokes on it and spits out the following error message: > >### Link: Error: Undefined entry, name: (Error 28) "__p_CType" > Referenced from: main in file: test.c.o >### Link: Errors prevented normal completion. > Your headers and libraries are parts of different MPW distributions. The array __p_CType is called three different things in the 3.0, 3.1 and 3.2 releases. Bring everything up to date and you'll be ok. -Jack Eastman -Berkeley Systems, Inc.
Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (12/28/90)
MR> What on earth am I doing wrong in the following test programme?? MR> The compiler says it all fine and dandy, but it won't link. MR> #include <stdio.h> MR> #include <ctype.h> MR> main() { if (isalpha('a')) printf("say something"); else MR> printf("say something else"); } MR> The linker chokes on it and spits out the following error message: MR> MR> ### Link: Error: Undefined entry, name: (Error 28) "__p_CType" MR> Referenced from: main in file: test.c.o ### Link: Errors prevented MR> normal completion. Just turning CreateMake loose on it produced: Link -d -c 'MPS ' -t MPST {OBJECTS} #Test.c.o "{CLibraries}"StdClib.o "{Libraries}"Stubs.o "{Libraries}"Runtime.o "{Libraries}"Interface.o -o Test which works here. -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org
Chris.Gehlker@f20.n226.z1.FIDONET.ORG (Chris Gehlker) (12/28/90)
Reply-To: Chris.Gehlker@p12.f56.n114.z1.fidonet.org MR> What on earth am I doing wrong in the following test programme?? MR> The compiler says it all fine and dandy, but it won't link. MR> #include <stdio.h> MR> #include <ctype.h> MR> main() { if (isalpha('a')) printf("say something"); else MR> printf("say something else"); } MR> The linker chokes on it and spits out the following error message: MR> MR> ### Link: Error: Undefined entry, name: (Error 28) "__p_CType" MR> Referenced from: main in file: test.c.o ### Link: Errors prevented MR> normal completion. Just turning CreateMake loose on it produced: Link -d -c 'MPS ' -t MPST {OBJECTS} #Test.c.o "{CLibraries}"StdClib.o "{Libraries}"Stubs.o "{Libraries}"Runtime.o "{Libraries}"Interface.o -o Test which works here. -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org + Organization: FidoNet node 1:114/56.12 - AZ MAC UG, Phoenix AZ -- Chris Gehlker - via FidoNet node 1:105/14 UUCP: ...!{uunet!glacier, ..reed.bitnet}!busker!226!20!Chris.Gehlker INTERNET: Chris.Gehlker@f20.n226.z1.FIDONET.ORG