2015年9月18日 星期五

[C] How to use API which in other C code


CFLAGS="-I$(CURDIR)/../../OBJ/include/happy/" \
LDFLAGS="-L$(CURDIR)/../../OBJ/lib/" \
LIBS="-lhappy" \

CFLAGS = where is happy.h
LDFLAGS = Where is happy.so
LIBS = include happy.so

happy.h define into C code.
The example like following code.

#include <stdio.h>
#include <happy.h>

int main()
{
    printf("happy");
}

0 意見:

張貼留言