gcc时无法找到stdio.h

发布网友 发布时间:2022-04-23 00:52

我来回答

2个回答

热心网友 时间:2023-10-09 14:44

在电脑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>追问怎么在电脑path里面看有没有指向编译器的bin文件夹,还往继续说明,不是很懂!

热心网友 时间:2023-10-09 14:45

include <stdio.h>没有你就加上呗追问加上了这个头文件

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com