检查项目上的框架集成构建失败 [英] Check framework integration on project failed to build
问题描述
我正在为项目集成C检查框架,并且能够运行
I'm integrating C check framework for my project and I was able to run
autoreconf --install
成功,没有任何错误.
successfully without any errors.
但是,当我集成C检查框架时,出现了没有意义的错误和警告.
But when I integrate the C check framework, I'm getting an error and warnings that doesn't make sense.
这是我遇到的错误
src/Makefile.am:7: warning: variable 'main_LDADD' is defined but no program or
src/Makefile.am:7: library has 'main' as canonical name (possible typo)
tests/Makefile.am:2: error: 'SHELLTESTS_PROGRAMS' is used but 'SHELLTESTSdir' is undefined
tests/Makefile.am:3: warning:variable 'ShellTests_SOURCES' is defined but no program or
tests/Makefile.am:3: library has 'ShellTests' as canonical name (possible typo)
tests/Makefile.am:5: warning: variable ShellTests_LDADD' is defined but no program or
tests/Makefile.am:5:library has 'ShellTests' as canonical name (possible typo)
autoreconf:automake failed with exit status: 1
我遵循了C检查示例源代码,该代码与我的项目之间的区别在于我的类使用其他类的方法.
I've followed the C check example source code, the difference between that and my project is that my class uses other class' methods.
无论如何,这是我测试中的Makefile.am,它在构建项目时造成了破坏"
Anyways, this is the Makefile.am under my tests/ that is causing 'havoc' on building the project
TESTS = shelltests
SHELLTESTS_PROGRAMS = shelltests
ShellTests_SOURCES = ShellTests.c $(top_builddir)/src/Shell.h $(top_builddir)/src/Parser.h $(top_builddir)/src/JobControl.h
ShellTests_CFLAGS = @CHECK_CFLAGS@
ShellTests_LDADD = $(top_builddir)/src/libshell.la @CHECK_LIBS@
这是我的项目的文件结构
src-
Parser.h,Parser.c,Shell.h,Shell.c,Job.h,Job.c,Makefile.am
测试-
ShellTests.c Makefile.am
This is the file structure for my project
src -
Parser.h, Parser.c, Shell.h, Shell.c, Job.h, Job.c, Makefile.am
tests -
ShellTests.c Makefile.am
这是src下Makefile.am中的代码.
And this is the code in Makefile.am under src.
lib_LTLIBRARIES = libshell.la
libshell_la_SOURCES = Shell.c Shell.h Parser.h Parser.c JobControl.h JobControl.c
bin_programs = main
main_sources = Main.c
main_LDADD = libshell.la
我遵循了此用户的建议,看是否能消除错误: las,事实并非如此.
I followed this user's advice to see if it removes the error: What directory should I use for "error: 'extra_PROGRAMS' is used but 'extradir' is undefined"? Alas, it does not.
我尝试构建示例项目-在示例中下载时获得的项目,以查看是否缺少任何内容.但是它不能在我的机器上构建.
I've tried building the example project - the one that you get when you download under examples, to see if I'm missing anything. But it's not able to build on my machine.
我在Mac OS X Mavericks(10.9)上
I'm on Mac OS X Mavericks (10.9)
- Autoconf 2.69
- Automake 1.15
- Libtool 2.4.6
- 检查0.9.14
推荐答案
我做了几件事成功地构建了这个项目.我首先按照此处概述的内容进行操作:检查框架示例给我的错误运行"./configure"时
I did a couple of things to build this project successfully. I first followed what I outlined here: Check framework example giving me error when running './configure'
然后,我遵循c check框架对测试源文件的命名约定.
Then I followed c check frameworks' naming conventions for the tests source files.
感谢帮助人员,它使我对导致编译错误的原因有一些想法.
Thanks for the help guys, it gave me some ideas on what the cause of compilation errors.
这篇关于检查项目上的框架集成构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!