1、apt-get install sqlite3
apt-get instal
l libsqlite3-dev
否则会出现: 致命错误: sqlite3.h:没有那个文件或目录
2、apt-get install curl
pat-get install libcurl4-openssl-dev,检查/usr/include/curl这目录存在吗?
注意编译选项在最后。
CC=gcc
DEBUG_FLAGS=-g #-DDEBUG
INCLUDE_FLAGS=-I../include
LIBRARY_FLAGS=-L../lib -lcurl -lpthread -l sqlite3
OPTIMIZE_FLAGS=#-O6
WARNING_FLAGS=#-Wall
CFLAGS:=$(DEBUG_FLAGS) $(INCLUDE_FLAGS) $(OPTIMIZE_FLAGS) $(WARNING_FLAGS)
objects=main.c
main:$(objects)
$(CC) $(CFLAGS) $(objects) -o main $(LIBRARY_FLAGS)
clean:
rm main
# @echo files cleared
run:
./main
阅读(1335) | 评论(0) | 转发(0) |