Article View: comp.sys.next.programmer
Article #2050Re: _very_ basic RenderMan question
From: Thomas Roettig
Date: Mon, 14 Dec 1992 13:48
Date: Mon, 14 Dec 1992 13:48
62 lines
2000 bytes
2000 bytes
In article <92346.164214U54876@uicvm.uic.edu> <U54876@uicvm.uic.edu> writes:
> Hello -
>
> To all you experienced NeXT programmers out there, a very basic question
abou
> t RenderMan from someone who has just started programming.
> I have copied, verbatim, the "minimal program using RenderMan" from page 18
> of The RenderMan Companion, saved it as test.c, and tried to compile it using:
> cc -lMedia_s test.c -o test
>
> I get:
>
> /bin/ld: Undefined symbols:
> _RiBegin
> _RiWorldBegin
> _RiSurface
> _RI_P
> _RiPolygon
> _RiWorldEnd
> _RiEnd
>
> Can anyone take a little time to e-mail some help to me? It would be greatly
> appreciated.
>
> -Tom
Try it that way:
-------------------------
#import <ri/ri.h>
RtPoint Square[4]={{.5,.5,.5}, {0.5,-.5,.5}, {-.5,-.5,.5}, {-.5,.5,.5}};
int main(void)
{
char *archive = "archive";
RiBegin(RI_NULL, "renderer", &archive, RI_NULL); /*Start the renderer */
RiWorldBegin();
RiSurface("constant", RI_NULL);
RiPolygon(4,
/*Declare the square */
RI_P, (RtPointer) Square, RI_NULL);
RiWorldEnd();
RiEnd();
/* Clean up */
return 0;
}
------------------------
To compile use a Makefile with something like this:
--------------------------
rib: 1.c
cc -g -O -Wall -o rib 1.c -lMedia_s -lNeXT_s
--------------------------
This gets you going.
--
Gruss
Tom
_____________________________________
Thomas Roettig
thomas@nice.usergroup.ethz.ch
Technical Details
Message-ID:
<1992Dec14.134841.557@ifi.unizh.ch>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!chx400!josef!newsReferences:
<92346.164214U54876@uicvm.uic.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!chx400!josef!news From: roettig@ifi.unizh.ch (Thomas Roettig) Subject: Re: _very_ basic RenderMan question Message-ID: <1992Dec14.134841.557@ifi.unizh.ch> Sender: news@ifi.unizh.ch (USENET News Admin) Nntp-Posting-Host: atan Organization: University of Zurich, Department of Computer Science References: <92346.164214U54876@uicvm.uic.edu> Date: Mon, 14 Dec 1992 13:48:41 GMT Lines: 62