Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cmake与CDT4 eclipse生成器一起生成unix生成文件_Eclipse_Cmake_Cygwin_Eclipse Cdt - Fatal编程技术网

cmake与CDT4 eclipse生成器一起生成unix生成文件

cmake与CDT4 eclipse生成器一起生成unix生成文件,eclipse,cmake,cygwin,eclipse-cdt,Eclipse,Cmake,Cygwin,Eclipse Cdt,上面的代码用于为Cygwin环境以及eclipse项目生成一个makefile。我在Windows7上与cygwin一起使用EclipseMars。该项目使用gdb设置调试器 项目名称为“跟踪器” 现在,在Eclipse的项目浏览器窗格中,展开项目名称->[Targets]->[exe]Tracker->Source files cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GE

上面的代码用于为Cygwin环境以及eclipse项目生成一个makefile。我在Windows7上与cygwin一起使用EclipseMars。该项目使用gdb设置调试器

项目名称为“跟踪器”

现在,在Eclipse的项目浏览器窗格中,展开项目名称->[Targets]->[exe]Tracker->Source files

cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT=TRUE -D_ECLIPSE_VERSION=4.5 -DCMAKE_SYSTEM_NAME=Windows -DPROJECT_SOURCE_DIR=C:/Projects/tracker ../tracker (unix style path. This is the path where the cmake list files are located)
C:\cygdrive\C\Projects\tracker\hello.cpp-(不存在)

由于我为cygwin(unix makefiles)使用了Cmake CDT4 eclipse生成器,因此Cmake命令的命令行路径也是unix风格的。如果我将其更改为DOS样式,make将无法识别路径和BARF(因为cmake现在使用DOS样式的路径生成make文件)

如何配置cmake,使其仅在目标下使用这些源文件的windows路径,以便eclipse在启动调试会话时可以找到它们

    The file icons have an exclamation on them. It turns out that on right-click->properties, the file's location is listed as