所以我使用MinGW作为Windows的C编译器我做了一个简单的C程序
#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;
}
所以我使用命令...
gcc -o test.o test.c -I"\..\Program Files (x86)\Pixie\include" -L"\..\Program Files (x86)\Pixie\lib" -lri
确定预编译器的包含文件在哪里......以及链接器的库在哪里
我收到以下错误
:\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 文件中
有没有人有什么建议?