Forums

You are not logged in.

#1 2007-01-21 11:40:21

christaylor
Member
Registered: 2007-01-21
Posts: 11

Programming with API calls

Can I use the ri.h header file to program old-style C programs that make Renderman API calls? I tried to compile this with gcc on Mac OSX but the linker complained about undefined symbols:

#include </Applications/Graphics/3Delight-6.0.4/include/ri.h>

      RtPoint Square[4]= {{.5,.5,.5},{.5,-.5,.5},{-.5,-.5,.5},{-.5,.5,.5}};
      main()
        {
        RiBegin(RI_NULL);
        RiWorldBegin();
        RiSurface("constant",RI_NULL);
        RiPolygon(4, RI_P,(RtPointer)Square,RI_NULL);
        RiWorldEnd();
        RiEnd();
        }

Offline

 

#2 2007-01-22 00:11:46

berj
Member
From: Toronto, Ontario
Registered: 2007-01-10
Posts: 111
Website

Re: Programming with API calls

Did you link against lib3delight when you compiled?

Offline

 

#3 2007-01-22 12:35:02

christaylor
Member
Registered: 2007-01-21
Posts: 11

Re: Programming with API calls

How do I do that, something like "cc test1.c -l$DYLD_LIBRARY_PATH" or "-L"? cc is a link to gcc4. Thanks.

Offline

 

#4 2007-01-22 15:12:16

christaylor
Member
Registered: 2007-01-21
Posts: 11

Re: Programming with API calls

Never mind, I see it in the user's guide.

Offline

 

Board footer

PunBB is © Copyright 2002–2005 Rickard Andersson

You are here: Resources » Forums
Follow us on Twitter
© 2006-2011 dna research. All Rights Reserved.
Trademarks & Copyrights Notices