問題:我需要鏈接以獲取/asm-generic/cmpxchg-local.h可訪問的內容?無法編譯針對asm-generic/cmpxchg-local.h
信息:
我知道我錯過了一些鏈接在哪裏,但我不能找出正確的命令。鏈接編譯器時,我不太好。我試圖編譯一個簡單的程序來測試我對cmpxchg-local.h的訪問。我看到有人將其作爲「asm-generic/cmpxchg-local.h」來執行,但這也不起作用。我跑定位,並發現這裏的文件:
/usr/src/linux-headers-3.0.0-14/include/asm-generic/cmpxchg-local.h
所以我試圖把整個文件路徑爲我有,像這樣:
#include </usr/src/linux-headers-3.0.0-14/include/asm-generic/cmpxchg-local.h>
#include <stdio>
int main()
{
printf("Hello world!\n");
}
這繼而又告訴我,它找不到LINUX/irqflags.h。顯然有些鏈接一些地方失蹤,任何建議?
與編譯:
gcc cmpandswp.c -o test -lm