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. 【PTA 天梯赛】L1-046 整除光棍(除法模拟)

    这里所谓的“光棍”,并不是指单身汪啦~ 说的是全部由1组成的数字,比如1.11.111.1111等.传说任何一个光棍都能被一个不以5结尾的奇数整除.比如,111111就可以被13整除. 现在,你的程序 ...

  2. 二进制mysql安装相关知识

    建议安装5.x版本 高版本没安装经验的慎用 1.1 关闭防火墙systemctl stop firewalld.service #停止firewall#慎用 systemctl disable fir ...

  3. js的组合函数

    1.组合函数即由若干个函数组合成一个新的函数,同时完成数据的传递 1>最简单版本 这种方法实现的组合函数,需要我们指定函数的执行顺序 /**第一种方法 */ function add(a, b) ...

  4. PL/SQL报错:ORA-28000:the account is locked

    第一种方法(图形操作):第一步:使用PL/SQL,登录名为system,选择类型的时候把Normal修改为SYSDBA:第二步:选择users下的system,右击点击“编辑”: 第三步:修改密码,把 ...

  5. Windows8系统下设置Mongodb开机启动

    1. 官网下载安装 MongoDB https://www.mongodb.com/ 2. 环境变量设置 把 mongod.exe 所在路径加入到环境变量的PATH, 我这里安装的路径是 D:\db\ ...

  6. jquery ajax 滚动加载数据

    jquery php 滚动加载数据(文件包 rollingpage) 效果如下: 页面加载时候($function(){ 自动加载第一页数据 }) 设置: var winH = $(window).h ...

  7. nginx 开启phpinfo

    在nginx配置文件中加 location / { //如果是资源文件,则不走phpinfo模式 if (!-e $request_filename){ ewrite ^/(.*)$ /index.p ...

  8. SQL宽字节注入

    0x00 概述 - 什么是宽字节注入? 宽字节注入就是因为gbk编码方式需要两个ascii码组合来解码,所以形象的叫做宽字节,这个作为了解即可 -宽字节注入的条件 1) 数据库查询设置为GBK编码 2 ...

  9. 自定义udf添加一列

    //创建得分窗口字典 var dict= new mutable.HashMap[Double, Int]() ){ dict.put(result_Score(i),i) } //自定义Udf函数 ...

  10. 关于makefile中自动产生依赖的理解

    本博文是在学习了<GNU Make中文手册>后记录下来的自己的关于自动产生makefile依赖的语句的理解,向大家分享. <GNU make中文手册>中的相关章节见一下链接: ...