如何在Windows XP下从Dev-c ++获取预处理代码? [英] How to get preprocessed code from Dev-c++ under Windows XP?

查看:129
本文介绍了如何在Windows XP下从Dev-c ++获取预处理代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows XP下从DevC ++获取预处理的C ++代码?我已经阅读关于创建 gcc -E file.cpp 文件,但我仍然无法连接的点,如何运行这个文件?

How to get preprocessed C++ code from DevC++ under Windows XP? I've read about creating gcc -E file.cpp file, but I still can't connect the dots, how to run this file? After I've compiled it everything went as usual.

推荐答案

你根本无法'run'预处理文件。您只需编译并运行它,或检查预处理器生成的内容。

You simply can't 'run' a preprocessed file. You can just compile and run it, or inspect it for what the preprocessor produced.

例如。当使用GCC时可以运行

E.g. when using GCC you can run

gcc file.cpp -E <all preprocessor options as set from the IDE> -o file_preprocessed.cpp

以获取 file_preprocessed.cpp file for inspect。

to get the file_preprocessed.cpp file for inspection.

我不知道 dev-c ++ 特别是IDE,但通常你会得到一个项目实际使用的编译器标志的表示在项目设置的某个地方。

I don't know for the dev-c++ IDE in particular, but usually you'll get a representation of the actually used compiler flags of a project in the project settings somewhere.

这篇关于如何在Windows XP下从Dev-c ++获取预处理代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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