使Eclipse生成C ++可执行文件 [英] Make Eclipse generate C++ executable file

查看:128
本文介绍了使Eclipse生成C ++可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用最新的MinGW和C ++ Eclipse.

Using latest MinGW and C++ Eclipse.

如果我创建一个可执行的Hello World"项目,将其构建并运行,一切将按预期进行.

If I create an "Executable Hello World" project, build it and run it, everything works as expected.

如果我创建一个可执行的空项目",然后创建一个main.cpp文件,生成并运行,我将收到错误消息启动失败.找不到二进制文件."

If I create an "Executable Empty Project", then create a main.cpp file, build and run, I get the error message "Launch failed. Binary not found."

如何使空项目生成二进制文件?我在项目属性中到处都是,但是我一定错过了.

How can I make empty project generate binary files? I looked everywhere in the project properties but I must have missed it.

推荐答案

对我来说,解决方案是:

For me the solution was this:

选择您的项目,然后转到项目"-菜单/属性(在Mac上).

select your project and goto "project"-menu/properties (on mac).

c/c ++构建/设置.

c/c++ Build/Settings.

二进制解析器.现在勾选一个适合您的系统的选项(对于Linux来说是elf,对于Mac来说是64马赫,对于Windows来说是pe).默认值始终是elf,并且在每个项目之后都会恢复为默认值,至少对我来说如此.

Binary parsers. now tick the one that suits your system (elf for linux, mach 64 for mac, pe for windows etc). the default is always elf and it reverts to it after every project, at least for me.

这篇关于使Eclipse生成C ++可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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