我有一个像
这样的目录结构Makefile.am
Configure.ac
src/
add.c
add.h
Makefile.am
tests/
test.c
Makefile.am
test / Makefile.am:
AM_CFLAGS = -Wall -lcunit
AM_CPPFLAGS = -I$(top_srcdir)/src
bin_PROGRAMS = test
test_SOURCES = tests.c src/add.h
test_CFLAGS = $(AM_CFLAGS)
测试/ test.c的
#include "src/add.h"
src / add.h:
int addNum(int a, int b);
当我使文件出错时
undefined reference to `addNum'