在MacOS上使用CLion构建项目时出现问题

当我使用CLion进行编译并且正在构建可执行文件时,我正在用C ++编写一个学校项目,

扫描目标msab的依赖性

x86_64体系结构的未定义符号:

call :: call(std :: __ 1 :: basic_string,std :: __ 1 :: allocator> const&)

引用自:driver.cpp.o中的_main

contact :: contact(std :: __ 1 :: basic_string,std :: __ 1 :: allocator> const&,std :: __ 1 :: basic_string,std :: __ 1 :: allocator> const&)“

引用自:driver.cpp.o中的_main

ld:架构x86_64找不到符号

clang:错误:链接器命令失败,退出代码为1(使用-v查看调用)

make [3]:*** [msab]错误1

make [2]:*** [CMakeFiles / msab.dir / all]错误2

make [1]:*** [CMakeFiles / msab.dir / rule]错误2

make:*** [msab]错误2

如果我理解正确,当它说未定义符号时,它表示我正在运行的一些构造函数。

我的构造函数的结构如下:

通话通话(“我正在读取数据的文件的路径”);

contacts contacts(“ path2”,“ path3”);

说未定义符号是什么意思?

我调用构造函数的方式有问题吗?

如果我尝试制作一个makefile,会不会是同样的问题?

我在macOS上使用CLion。

谢谢!

fangsufang 回答:在MacOS上使用CLion构建项目时出现问题

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2992751.html

大家都在问