Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Including glibtop in linux CPU load
- `#include "stdio.h"
- #include "glibtop.h"
- #include "glibtop/cpu.h"
- int main(){
- glibtop_init();
- glibtop_cpu cpu;
- glibtop_get_cpu (&cpu);
- printf("CPU TYPE INFORMATIONS nn"
- "Cpu Total : %ld n"
- "Cpu User : %ld n"
- "Cpu Nice : %ld n"
- "Cpu Sys : %ld n"
- "Cpu Idle : %ld n"
- "Cpu Frequences : %ld n",
- (unsigned long)cpu.total,
- (unsigned long)cpu.user,
- (unsigned long)cpu.nice,
- (unsigned long)cpu.sys,
- (unsigned long)cpu.idle,
- (unsigned long)cpu.frequency);
- return 0;
- }`
- cpuLoad.c:2:21: error: glibtop.h: No such file or directory
- In file included from cpuLoad.c:3:
- glibtop/cpu.h:25:21: error: glibtop.h: No such file or directory
- glibtop/cpu.h:26:28: error: glibtop/global.h: No such file or directory
- In file included from cpuLoad.c:3:
- glibtop/cpu.h:59: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtypedefâ
- glibtop/cpu.h:63: error: expected specifier-qualifier-list before âguint64â
- glibtop/cpu.h:84: error: expected â)â before â*â token
- glibtop/cpu.h:92: error: expected â)â before â*â token
- glibtop/cpu.h:98: error: expected â)â before â*â token
- glibtop/cpu.h:99: error: expected â)â before â*â token
- cpuLoad.c:9: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âintâ
Advertisement
Add Comment
Please, Sign In to add comment