每次我嘗試編譯一個示例程序時,我都找不到cv.h,找不到highgui.c。我嘗試去opencv中的includes文件夾,並做了sudo copy * to usr/includes,並沒有多大幫助:我得到了以下輸出,有人可以告訴我我做錯了什麼?gcc編譯錯誤cv.h未找到Opencv
stream_server.c:19:25: fatal error: /usr/include/highgui.h: Permission denied
compilation terminated.
[email protected]:~/Desktop$ sudo gcc stream_server.c -o streamserver
stream_server.c: In function ‘quit’:
stream_server.c:174:5: warning: format not a string literal and no format arguments [-Wformat-security]
stream_server.c:177:5: warning: format not a string literal and no format arguments [-Wformat-security]
/tmp/ccVnjC7y.o: In function `cvDecRefData':
stream_server.c:(.text+0xa9a): undefined reference to `cvFree_'
stream_server.c:(.text+0xb22): undefined reference to `cvFree_'
/tmp/ccVnjC7y.o: In function `cvGetRow':
stream_server.c:(.text+0xc39): undefined reference to `cvGetRows'
/tmp/ccVnjC7y.o: In function `cvGetCol':
這文件怎麼回事? '/ usr/include/highgui.h' –
'cat/usr/include/highgui.h'輸出是什麼?你真的有權限閱讀嗎? –
找不到文件 – DasBoot