can't compile using apm.h
Hi all, i'm attempting to make a program to monitor and log my battery power (don't ask). I looked first at shell scripts, but I can't find any working shell commands that will report power (apm just says kernel doesn't support APM, acpid says it's busy, etc).
Therefore i've gone to a c program, because i know those have access to apm somehow (I have the battstat applet running, and it reports power just fine). problem there is, I can't compile anything that uses apm.h, the linker doesn't seem to find apm_read(). I've even gone thru apm.h itself and it does list that particular function. Here's an excerpt of my test program: Code:
#include <stdio.h> Any ideas why this won't compile? or can you suggest any other routes to write a battery power logger? |
did you try:
Code:
cc myprog.c -lapm |
I guess compiling the library in would help. :rolleyes: I don't have a lot of experience using shared libs, can you tell?
it does at least compile that way. doesn't retrieve the info like i thought, but at least it compiles. thanks a million, i'll keep working on it from here |
All times are GMT -5. The time now is 08:26 PM. |