修复#includes<>对于GCC(Code :: Blocks) [英] Fixing #includes <> for GCC (Code::Blocks)

查看:166
本文介绍了修复#includes<>对于GCC(Code :: Blocks)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用为不同编译器/链接器编写的代码,并且它包括如下文件:

I am working with some code that was written for a different compiler/linker, and it is including files like this:

#include <Engine/Graphics/Sprite.h>




<该项目包含这样一个文件在该路径(从项目的根),但当我建立我得到文件未找到错误。

The project contains such a file at that path (from the root of the project), but when I build I get the file not found error.

如何解决所有

推荐答案

我不太确定如果我理解你的解释,你是什​​么意思与从项目的根。但是好...

I'm not quite sure if I understand your explanation, what do you mean with "from the root of the project". But well...

当你使用#include指令和<>你告诉编译器是寻找你包含的目录上的文件-I选项。

When you use the #include directive with <> what your are telling the compiler is to look for the the file on the Directories you include with -I option.

在代码块中,转到Project-> Build Options-> Search Directories-> Compiler

In code blocks go to Project->Build Options->Search Directories->Compiler

您可以在这里找到更多信息
http://msdn.microsoft.com/en-us/library/36k2cdd4(v = vs.71).aspx

You can find more info here http://msdn.microsoft.com/en-us/library/36k2cdd4(v=vs.71).aspx

编辑:在尝试任何操作之前,尝试 #includepath / somefile.h code> #include< pathsomefile.h>

Before trying anything, try #include "path/somefile.h" instead of #include <pathsomefile.h>

这篇关于修复#includes&lt;&gt;对于GCC(Code :: Blocks)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆