Tag: gcc4.7

链接器错误:gcc

我每次都会收到此错误,同时编译程序,配置和安装 像binutils,textinfo等一些东西。 /usr/local/bin/ld: this linker was not configured to use sysroots collect2: error: ld returned 1 exit status 我想清楚地知道这一点。 何时会到来,实际问题是什么,以及如何解决?

为什么scanf(“%hhu”,char *)在本地时会覆盖其他变量?

标题说明了一切。 我正在使用GCC 4.7.1(与CodeBlocks捆绑在一起),我遇到了一个奇怪的问题。 考虑一下: int main() { unsigned char a = 0, b = 0, c = 0; scanf(“%hhu”, &a); printf(“a = %hhu, b = %hhu, c = %hhu\n”, a, b, c); scanf(“%hhu”, &b); printf(“a = %hhu, b = %hhu, c = %hhu\n”, a, b, c); scanf(“%hhu”, &c); printf(“a = %hhu, b = %hhu, c […]