[Tutorials] string.h和cstring在deepin中的哪个文件夹
Tofloor
poster avatar
hgrlake
deepin
2021-06-08 23:34
Author

编译QuickParanoid时出错,按作者建议需要将string.h加入到源代码中,请问应如何解决

Reply Favorite View the author
All Replies
ucSec
deepin
2021-06-09 00:07
#1
#include 
Reply View the author
jzc
deepin
2021-06-09 00:20
#2

C语言  #include

我记得头文件在 /usr/include 文件夹中

Reply View the author
安洛
deepin
2021-06-09 16:27
#3

你是不是在执行第四步,编译qa2.cpp的时候报错?

在qa2.cpp的开头,有一堆#include的地方,加入一个#include试试?

Reply View the author
阿措
deepin
2021-06-09 17:35
#4

2.jpg

用whereis 命令

 

Reply View the author
hgrlake
deepin
2021-06-10 00:31
#5
安洛

你是不是在执行第四步,编译qa2.cpp的时候报错?

在qa2.cpp的开头,有一堆#include的地方,加入一个#include试试?

我加入了#include 后,编译qa2.cpp时出现了下列错误信息:

qa2.cpp: In function ‘std::__cxx11::string str_tokenizer(std::__cxx11::string, int*)’:

qa2.cpp:527:1: warning: control reaches end of non-void function [-Wreturn-type]

 }

分析后认为可能是QuickParanoid编写时使用gcc版本较低,使用的可能是c11,而现在deepin20中gcc8.3.0用的是c++11,二者不兼容,请问如何解决这一问题?

Reply View the author
安洛
deepin
2021-06-10 04:36
#6
hgrlake

我加入了#include 后,编译qa2.cpp时出现了下列错误信息:

qa2.cpp: In function ‘std::__cxx11::string str_tokenizer(std::__cxx11::string, int*)’:

qa2.cpp:527:1: warning: control reaches end of non-void function [-Wreturn-type]

 }

分析后认为可能是QuickParanoid编写时使用gcc版本较低,使用的可能是c11,而现在deepin20中gcc8.3.0用的是c++11,二者不兼容,请问如何解决这一问题?

你是include了string.h还是cstring?

Reply View the author
hgrlake
deepin
2021-06-10 18:43
#7
安洛

你是include了string.h还是cstring?

include

Reply View the author
hgrlake
deepin
2021-06-10 18:43
#8
hgrlake

include

cstring

Reply View the author
安洛
deepin
2021-06-12 01:45
#9
hgrlake

cstring

没记错的话cstring好像是c++的头文件?用string.h试试?

Reply View the author