2013-06-07 4 views
0

그래서 나는 Windows 용 C 컴파일러로는 MinGW를 사용하고 난 다음 명령을 사용

#include "ri.h" 
RtPoint Square[4] = { { .5,.5,.5} ,{.5,-.5,.5} , {-.5,.5,.5} , {-.5, -.5 , .5}}; 
static RtColor Color = {.2,.4,.6}; 
int main(){ 
     RiBegin (" square.rib"); 
     RiDisplay (" square.tif" , "file" ,"rgb" ,RI_NULL); 
     RiWorldBegin(); 
    RiSurface("constant" , RI_NULL); 
    RiColor(Color); 
    RiPatch (RI_BILINEAR,RI_P,(RtPointer)Square,RI_NULL); 
    //RiPatch (RI_BICUBIC,RI_P,(RtPointer)Square,RI_NULL); 
    RiWorldEnd(); 
RiEnd(); 
return 0; 
} 

그렇게 간단한 C 프로그램을 만들어 ...

gcc -o test.o test.c -I"\..\Program Files (x86)\Pixie\include" -L"\..\Program Files (x86)\Pixie\lib" -lri

가 포함 된 파일은 프리 D 파일러에 대한 어디에 확인 ... 그리고 위치를

나는 다음과 같은 오류가 링커에 대한 라이브러리 내가 누락 된 자료를 참조하십시오의

:\Users\Edward\AppData\Local\Temp\ccEERD04.o:test.c:(.text+0x6e): undefined ref 
erence to `_imp__RI_P' 

C:\Users\Edward\AppData\Local\Temp\ccEERD04.o:test.c:(.text+0x75): undefined ref 
erence to `_imp__RI_BILINEAR' 

c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: C:\Users\E 
dward\AppData\Local\Temp\ccEERD04.o: bad reloc address 0x20 in section `.eh_fram 
e' 
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: final link 
failed: Invalid operation 
collect2.exe: error: ld returned 1 exit status 

내가 연결을위한 라이브러리를 놓친 것 경우에 볼려고하지만 ... 아무도 그러나

사람이 어떤 제안 않음 .H 파일

에?

답변

0

이 문제의 해결 방법을 찾을 수있었습니다 .... 나는 ri.h 의 소스 파일을보고 상수가 초기화 된 것을 발견했습니다. RI_P는 "P"RI_BILINEAR는 "선형"

내가

RiPatch ("bilinear","P",(RtPointer)Square,RI_NULL); 

이 나를 C 파일을 컴파일 할 수 및 RNDR 이미지에

RiPatch (RI_BILINEAR,RI_P,(RtPointer)Square,RI_NULL); 

을 변경이었다.