我正在使用apt-get、cpp-4.7.arm-linux-gnueabihf和gcc-4.7.arm-linux-gnueabihf在Debian8.3Jessie中安装一些开发工具,但是libmpc2存在依赖问题。
root@debian-host:~# apt-get install cpp-4.7.arm-linux-gnueabihf gcc-4.7.arm-linux-gnueabihf
Reading package lists... Done
Building dependency tree
Reading state information... Done
N
我不能再和gcc合作了。
使用gcc -o run mytest.cpp,给出:
mytest.cpp:12:9: error: expected ‘;’ at end of member declaration
mytest.cpp:12:14: error: expected unqualified-id before ‘;’ token
mytest.cpp: In constructor ‘matrix::matrix()’:
mytest.cpp:23:26: error: invalid conversion from ‘int**’ to ‘int’ [-fpermissive]
我遵循指南,但是当我试图构建c++库时,我会得到以下致命错误。
../../../../gcc-11.1.0/libsanitizer/asan/asan_linux.cpp: In function ‘void __asan::AsanCheckIncompatibleRT()’:
../../../../gcc-11.1.0/libsanitizer/asan/asan_linux.cpp:199:21: error: ‘PATH_MAX’ was not declared in this scope
199 | char filename[PATH_MAX];
temp_holder.clear();
temp_holder << n;
n_str = temp_holder.str();
int f = count(n_str.begin(), n_str.end(), a);
这是我的代码,这是g++输出:
In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/algorithm:63:0,
from trintatres.cpp:5:
/usr/l
我尝试用"g++ -std=c++11 -o w w.cpp“编译下面的程序,得到错误”cc1plus: error: unrecognized command line option "-std=c++11“”。已尝试使用g++ -Dstd=c++11 -o w w.cpp进行编译,并获得以下错误集:
In file included from /usr/lib/gcc/i686-redhat-linux/4.4.7/../../../../include/c++/4.4.7/iosfwd:41,
from /usr/lib/gcc/i686
计划:
#include <thread>
int main(void)
{
std::thread t;
return 0;
}
test.cpp: In function ‘int main()’:
test.cpp:6:5: error: ‘thread’ is not a member of ‘std’
std::thread t;
^~~
GCC信息:
$ g++ test.cpp -H
. /home/nathan/development/toolchain/gnu/x86_64-unknown-linux-gnu/include/c
我正试着再次学习使用makefiles。我有这样一个目录结构:
build
|- Makefile
|- Project files, like visual studio project
tmp
|- $(os name)_$(compiler)
|- *.o and any other intermediate files
bin
|- $(os name)_$(compiler)
|- the compiled binary executable
|- debug info, if any
src
|- *.cpp, *.h
因此,我在谷歌和实