when i make and install in mac osx10.12.4, it tell me can`t find the mobi.h
buzai opened this issue · 5 comments
main.c:10:11: fatal error: 'mobi.h' file not found
how can i fix this error.
Please give more details.
What did you do, step by step?
@bfabiszewski
I git clone this repo;
cd libmobi, As you explained, I did make, and make install.
I write a c file.
#include <mobi.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
MOBIData *m = mobi_init();
if (m == NULL) {
printf("ERROR 1 ");
return 0;
}
return 0;
}
i run gcc main.c -lmobi, but i cant get a a.out . error is
main.c:10:11: fatal error: 'mobi.h' file not found
If you ran ./configure
without any parameters libmobi was probably installed in /usr/local
prefix. The header is installed in /usr/local/include
.
If you are on Mac the compiler doesn't search this path for headers by default. You will have to add it manually.
The same applies to linker. You will have to manually add /usr/local/lib
path, where libmobi library is installed.
@bfabiszewski thank u ,i will try it