gcc时无法找到stdio.h
是这个样的,我从别人的虚拟机下拷了一个linux的虚拟机到我的虚拟机,然后我直接载vmware选择安装新的虚拟机打开linux然后我做了一个小的.c程序gcc时报错没有s...
是这个样的,我从别人的虚拟机下拷了一个linux的虚拟机到我的虚拟机,然后我直接载vmware选择安装新的虚拟机打开linux然后我做了一个小的.c程序 gcc时报错没有stdio.h
该怎么办? 展开
该怎么办? 展开
展开全部
在电脑path里看有没有指向编译器的bin文件夹
如果有就看看编译器的include文件夹里有没有stdio.h这个文件,没有就自己做一个放进去,这里是stdio.h的源代码:
// TR1 stdio.h -*- C++ -*-
// Copyright (C) 2006-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file tr1/stdio.h
* This is a TR1 C++ Library header.
*/
#ifndef _TR1_STDIO_H
#define _TR1_STDIO_H 1
#include <tr1/cstdio>
#endif
从源代码上看stdio.h只包含了cstdio,可以用#include <cstdio>替换 #include <stdio.h>
如果有就看看编译器的include文件夹里有没有stdio.h这个文件,没有就自己做一个放进去,这里是stdio.h的源代码:
// TR1 stdio.h -*- C++ -*-
// Copyright (C) 2006-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
/** @file tr1/stdio.h
* This is a TR1 C++ Library header.
*/
#ifndef _TR1_STDIO_H
#define _TR1_STDIO_H 1
#include <tr1/cstdio>
#endif
从源代码上看stdio.h只包含了cstdio,可以用#include <cstdio>替换 #include <stdio.h>
追问
怎么在电脑path里面看有没有指向编译器的bin文件夹,还往继续说明,不是很懂!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询