Question: what do i need to link to get /asm-generic/cmpxchg-local.h accessible?
Info:
I know I'm missing a link some where, but I can't figure out the right command. I'm not very good when it comes to linking for compilers. I tried to compile a simple program to test my access to cmpxchg-local.h. i saw some one do it as "asm-generic/cmpxchg-local.h" but that didn't work either. I ran locate and it found the file here:
/usr/src/linux-headers-3.0.0-14/include/asm-generic/cmpxchg-local.h
So i tried putting the whole file path into my include like so:
#include </usr/src/linux-headers-3.0.0-14/include/asm-generic/cmpxchg-local.h>#include <stdio>int main(){ printf("Hello world!\n");}
That then proceeded to tell me that it couldn't find linux/irqflags.h. Obviously some linking some where is missing, any advise?
Compiling with:
gcc cmpandswp.c -o test -lm