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. No active profile set, falling back to default profiles: default

    No active profile set, falling back to default profiles: default 这个错误是由于idea没有设置默认启动环境,设置即可

  2. Python 基础 函数

    python 什么是函数 Python不但能非常灵活地定义函数,而且本身内置了很多有用的函数,可以直接调用.   python 函数的调用 Python内置了很多有用的函数,我们可以直接调用. 要调用 ...

  3. 记录一下自己用jQuery写的轮播图

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  4. 企业案例:查找当前目录下所有文件,并把文件中的https://www.cnblogs.com/zhaokang2019/字符串替换成https://www.cnblogs.com/guobaoyan2019/

    企业案例:查找当前目录下所有文件,并把文件中的https://www.cnblogs.com/zhaokang2019/字符串替换成https://www.cnblogs.com/guobaoyan2 ...

  5. HIve数据存储

    表 Table 内部表 Partition 分区表 External Table 外部表 Bucket Table 桶表 内部表 分区表 parttion对应于数据库中的Partition列的密集索引 ...

  6. C服务程序模板

    在DoWork中添加自己的代码.   服务安装: sc create srvdemo binpath= "F:\srvdemo.exe" 服务启动:sc start srvdemo ...

  7. C语言——第一章,1.4程序开发过程

    1.4程序开发过程 一,开发过程 1,分析问题,设计一种解决问题的途径(方案)★ 2,写出源代码 (*.c) 3,编译→(连接)   *.obj→(*.exe) 4,运行*.exe (可执行程序) 二 ...

  8. Go语言中结构体的使用-第1部分结构体

    1 概述 结构体是由成员构成的复合类型.Go 语言使用结构体和结构体成员来描述真实世界的实体和实体对应的各种属性.结构体成员,也可称之为成员变量,字段,属性.属性要满足唯一性.结构体的概念在软件工程上 ...

  9. python 验证码识别初探

    使用 pytesser 与 pytesseract 识别验证码 前置 :  首先需要安装  tesserract tesserract windows 安装包及中文 https://pan.baidu ...

  10. linux编程实践:实现pwd命令

    内核为每个目录都设置了一个指向自己的i节点入口,即".",还有一个指向其父目录i节点的入口,即"..",我们首先获取当前目录的i节点编号,但是并不能知道当前目录 ...