[Topic DIscussion] c++标准库版本低怎么弄?
Tofloor
poster avatar
野山菌
deepin
2022-04-15 04:16
Author

在b站看的视频教程,跟着编译项目报错的,平时写c#,不太懂c++的东西,网上查了一下好像这个什么excution 高级版本标准库才加的。这种怎么处理

image.png

Reply Favorite View the author
All Replies
Kingtous
deepin
2022-04-15 06:50
#1

试试提升C++标准版本,--stdc++=20试试?

Reply View the author
野山菌
deepin
2022-04-15 21:16
#2
Kingtous

试试提升C++标准版本,--stdc++=20试试?

是在cmakelists文件加吗,还是qtcreator里有设置

Reply View the author
depend
deepin
2022-04-15 22:01
#3

最好是视频里面它用的什么版本系统环境等等都要一样才好编译

Reply View the author
depend
deepin
2022-04-15 22:06
#4

我看到github的要求是cmake 3.19,比deepin上的版本不知道高还是低,可以看看

也可以根据ubuntu20.04那个方法编译

https://github.com/BoomingTech/Pilot

Reply View the author
野山菌
deepin
2022-04-16 22:58
#5
depend

我看到github的要求是cmake 3.19,比deepin上的版本不知道高还是低,可以看看

也可以根据ubuntu20.04那个方法编译

https://github.com/BoomingTech/Pilot

恩是的,是这个项目,之前报的是libm.so缺少GLIBC_29,然后下了个glibc2.29编译了,把libm.so放到引用他的目录了,现在编译通过了运行报错了

/media/windys-dde/DATA/WorkSpace_DDE/Pilot/build/engine/source/editor/PilotEditor
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

看不到哪里报的错

Reply View the author
depend
deepin
2022-04-18 17:14
#6
野山菌

恩是的,是这个项目,之前报的是libm.so缺少GLIBC_29,然后下了个glibc2.29编译了,把libm.so放到引用他的目录了,现在编译通过了运行报错了

/media/windys-dde/DATA/WorkSpace_DDE/Pilot/build/engine/source/editor/PilotEditor
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

看不到哪里报的错

你可以看看编译过的程序, 执行ldd +程序,看看连接库的位置,如果链接的是低版本的,运行自然有问题

Reply View the author
野山菌
deepin
2022-04-18 23:58
#7
depend

你可以看看编译过的程序, 执行ldd +程序,看看连接库的位置,如果链接的是低版本的,运行自然有问题

好的,我试试看

Reply View the author