Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/136.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 使用makefile从终端编译时出错_C++_Macos_Makefile - Fatal编程技术网

C++ 使用makefile从终端编译时出错

C++ 使用makefile从终端编译时出错,c++,macos,makefile,C++,Macos,Makefile,我试图在MacOSX10.10中重新编译一个命令行程序。几年前我最后一次这样做时,效果很好。我现在得到以下错误: HapList::Output(std::ostream&, std::vector<int, std::allocator<int> > const*, double, bool) in HapList2.o ld: symbol(s) not found for architecture x86_64 clang: error: linker

我试图在MacOSX10.10中重新编译一个命令行程序。几年前我最后一次这样做时,效果很好。我现在得到以下错误:

  HapList::Output(std::ostream&, std::vector<int, std::allocator<int> > const*, double, bool) in HapList2.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [PHASE] Error 1
HapList2.o中的HapList::Output(std::ostream&,std::vector const*,double,bool) ld:找不到架构x86_64的符号 叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用) make:**[相位]错误1 我是这方面的新手,除了在命令行提示符下键入“make”之外,我所知甚少。很明显,这与x86_64体系结构有关,但它以前在OSX Lion下编译得很好。有人知道如何解决这个问题吗


Matt

错误表明函数HapList::Output已声明,但在构建过程中未找到其定义(函数体)


找到该函数的定义所在的位置,并使用该定义找出它未包含在构建中的原因。

OSX Lion
使用了不同的编译器(
gcc
),较新的
OSX
使用
clang
。也许发布你的makefile,和/或更多关于你正在编译的内容的信息。愚蠢的问题,但我如何发布makefile?