Hi,
I'm trying to make some kind of Material editor, which will be used to preview materials in the early phase of design, before the final scene is composed. For that purpose I need to parse text file with material descriptions, to find out which materials are defined.
My idea is to use some of existing Radiance functions for parsing. I found that void readobj(char*) [readobj.c] could be useful for this. And finally there is a question:
Example of a code:
file: parser.c
···
------------------
#include "standard.h"
#include "object.h"
void parse(char* name)
{
readobj(name);
}
file: makefile
--------------------
RAD=/home/marija/ray/src/common
LRAD==/home/marija/ray/src/lib
CCOPTS=-O
parser: parser.c
cc $(CCOPTS) -I$(RAD) -o parser parser.c -L$(LRAD) -lrt -lm
_____________________________________________
When I try to make it, I get next error massages:
cc -O -I/home/marija/ray/src/common -o parser parser.c -L=/home/marija/ray/src/lib -lrt -lm
/home/marija/ray/src/lib/librt.a(otypes.o)(.text+0x17): In function `otype':
: undefined reference to `ofun'
/home/marija/ray/src/lib/librt.a(otypes.o)(.text+0x61): In function `objerror':
: undefined reference to `ofun'
/home/marija/ray/src/lib/librt.a(modobject.o)(.text+0xb9): In function `lastmod':
: undefined reference to `ofun'
/home/marija/ray/src/lib/librt.a(modobject.o)(.text+0x144): In function `insertobject':
: undefined reference to `ofun'
/home/marija/ray/src/lib/librt.a(readoct.o)(.text+0x55e): In function `nonsurfinset':
: undefined reference to `ofun'
/home/marija/ray/src/lib/librt.a(mesh.o)(.text+0xe64): more undefined references to `ofun' follow
collect2: ld returned 1 exit status
make: *** [parser] Error 1
___________________________________________________________________
My first idea was that I am doing something wrong, but when I tried to call some other functions that don't use "ofun" table, program is compiled without problems.
Could somebody, please, tell me what is the problem here, because I am trying to solve it for a week, without results.
Regards,
Marija.