In Mac,

the issue image:

1. A existing cmake project on disk

2. import this project into Eclipse.

3 run cmake

cmake "Unix Makefile" .

4. Build and Run this project on Eclipse successfully

5. After clicking Debug button on Eclipse, the following error appears:

"No source available for main()"

Solution:

At step 3, use the below command:

cmake . -DCMAKE_BUILD_TYPE=Debug

Then, the Eclipse debugging should work.

Reference:

"No source available for main()" while debugging in Eclipse IDE, ros.org

[C++] Solve "No source available for main()" error when debugging on Eclipse的更多相关文章

  1. JFinal启动报错:Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector

    - 错误: Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/server/ ...

  2. [C++] Solve "Launch Failed. Binary not found." error on Eclipse

    This error is that the default lanch configuration is not being created for this project. To solve i ...

  3. mysql source导入报错ERROR 1366的解决方法

    文件是utf8的,数据库表是utf8的,为什么客户端导入会报错呢? 发现客户端用的是gbk的 改为utf8后正常 SHOW VARIABLES LIKE 'character%'; +-------- ...

  4. 在有main函数的前提下 eclipse找不到主类

    有时候在测试类的时候eclipse会莫名奇妙的提示找不到主类   接下来分别有几种解决办法 1.在项目上右击> Builder Path -> Configure Build Path - ...

  5. 关于MyEclipse查看底层源码出现source not found的问题(MyEclipse、Eclipse配置JAD)

    一.MyEclipse 第一步:      下载jad.exe文件:jad下载地址 eclipse插件:net.sf.jadclipse_版本号.jar下载地址一 net.sf.jadclipse_版 ...

  6. "Resuming debugger: error during debugging loop: TypeError: firstViewRangeElement is null"

    翻译过来:“重启调试器:错误调试期间循环:TypeError:firstViewRangeElement为空” 写了一个项目,其中使用到了上传图片的插件,在本地上传图片一切正常,发布到服务器却不正常了 ...

  7. eclipse中java build path下 allow output folders for source folders 无法勾选,该如何解决 eclipse中java build path下 allow output folders for source folders 无法勾选,

    在创建maven工程时,在设置output folders时,总是勾选以后,老是自动恢复到原来的状态,对比其他的maven的工程发现是在创建maven时候选择的项目为pom,而不是war或者jar,将 ...

  8. 解决MyEclipe出现An error has occurred,See error log for more details的错误

    今晚在卸载MyEclipse时出现An error has occurred,See error log for more details的错误,打开相应路径下的文件查看得如下: !SESSION 2 ...

  9. 报错:org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4517)

    在Mars.Kepler的版本裡,時常會出現以下錯誤導致eclipse無法進行運作 Error.log org.eclipse.swt.SWTError: No more handles     at ...

随机推荐

  1. ABAP术语-XML

    XML 原文:http://www.cnblogs.com/qiangsheng/archive/2008/03/21/1115743.html The "eXtensible Markup ...

  2. 必须掌握的前端模板引擎之art-template

    常用的模板引擎有tpl.js.baiduTemplate.doT.js.art-template等等: 我所理解的模板引擎就是把js数据传到html中展示出来: art-template 是一个简约. ...

  3. php ajax confirm 删除

    <button name="del" type="button" class="btn btn-primary btn-xs" id= ...

  4. 嵌入式C语言自我修养 12:有一种宏,叫可变参数宏

    12.1 什么是可变参数宏 在上面的教程中,我们学会了变参函数的定义和使用,基本套路就是使用 va_list.va_start.va_end 等宏,去解析那些可变参数列表我们找到这些参数的存储地址后, ...

  5. ACM1020:Encoding

    Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following ...

  6. C语言中的强制类型转换

    先直接放程序吧,后面还有总结. -------------------------------------------start------------------------------------ ...

  7. node从搭建运行项目整体流程

    1. 初始化配置基本信息: npm init (自定义配置) npm init -y (一切配置采用默认值) 在当前目录产生package.json文件,有一个dependencies用来记录该项目所 ...

  8. Lingo安装

    Lingo安装 Lingo简介        LINGO是Linear Interactive and General Optimizer的缩写,即"交互式的线性和通用优化求解器" ...

  9. mybash的编写与调试

    fork() 计算机程序设计中的分叉函数.返回值: 若成功调用一次则返回两个值,子进程返回0,父进程返回子进程标记:否则,出错返回-1. fork函数将运行着的程序分成2个(几乎)完全一样的进程,每个 ...

  10. 20155311高梓云补交的Mypc课下实践

    20155311高梓云补交的Mypc课下实践 老师,由于我自己的疏忽导致没有及时交上这次作业.这是我的代码和截图. ``` ```/**import java.io.; import java.lan ...