Eclipse SDL构建错误:“启动配置中指定的程序不存在". [英] Eclipse SDL build error: "The program specified in the launch configuration does not exist"

查看:37
本文介绍了Eclipse SDL构建错误:“启动配置中指定的程序不存在".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试在设置蚀中使用一些SDL,并且在尝试运行它时出现了以下错误:

I've tried working some SDL on my set-up eclipse, and as I tried running it it gave me the following error:

  'Launching SDL.exe' has encountered a problem.
  The program specified in the launch configuration does not exist

我立即去了另一个项目,看看它是否可以构建,并且确实可以.我还尝试过重新构建,调试SDL项目.我不知道这是否是代码错误,但以防万一,这是代码:

I instantly went to another project to see if it builds, and it did. I also tried re-building, debugging the SDL project. I don't know if it's an error in code but just in case, this is the code:

#include "SDL/SDL.h"
#include <string>
#include <SDL/SDL_image.h>

SDL_Surface *load_image( std::string filename ) {
    SDL_Surface* loadedImage = NULL;
    SDL_Surface* optimizedImage = NULL;

    loadedImage = IMG_Load(filename.c_str());
    if(loadedImage != NULL) {
        optimizedImage = SDL_DisplayFormat(loadedImage);
        SDL_FreeSurface(loadedImage);
    }
    return optimizedImage;
}

我已经对其进行了谷歌搜索,并且stackOverFlow上有一个重复的问题

I've googled it, and there's a duplicate question on stackOverFlow here, however it has 0 answers, not even a comment. There are no answers on google regarding this problem, so if you'd answer it, you'd probably solve hours of headaches for more people.

推荐答案

我在Ubuntu中遇到了与eclipse相同的问题.花了30分钟,终于按如下所示进行了修复:

I encountered the same problem with eclipse in Ubuntu. Spent 30 minutes and finally got it fixed as below:

  • 点击 Project->属性;
  • 选择运行/调试设置,然后在右窗格上选择当前配置,单击 edit ;
  • 在c/c ++应用程序文本框中,选择搜索项目,然后单击要对当前项目执行的二进制文件.
  • Click Project -> Properties;
  • Select run/debug settings, and then the current configuration on the right pane, click edit;
  • In the c/c++ application textbox, select search project, and then click the binary you want to execute for the current project.

在我的系统上,先前的问题是由于默认文件名不正确---链接器生成了 abinary.exe ,但在运行配置中它是"binary".

On my system, the previous problem is due to incorrect default file name --- the linker generates abinary.exe but in run configuration it is "abinary".

如果Eclipse开发人员获得了MS或Apple开发人员的丰厚报酬,那么这些小问题(但很耗时)应该已经得到解决.las,免费软件?

Such tiny (but time consuming) problems should have been fixed by Eclipse developers, if they got well paid as MS or apple developers. Alas, free software?

这篇关于Eclipse SDL构建错误:“启动配置中指定的程序不存在".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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