我正在使用Eclipse 4.8和mingw-w64 5.3。可能需要注意的是,该项目也是使用CMake 3.12构建的。
使用CMake的“ MinGW Makefiles”生成器从命令行构建软件时,我没有任何问题。构建已创建,我能够成功实现。运行正常。
在我的开发中,GUI调试会话会有所帮助。我正在使用CMake的“ Eclipse CDT4-MinGW Makefiles”生成器构建构建目录,并且一切似乎进行顺利。我打开Eclipse,使用MinGW构建项目(成功,没有错误,也没有警告)。但是,整个实际C文件中都显示出与包含stdlib.h和mat.h(MATLAB库)有关的错误。
也可能值得注意的是,这个问题始于开发的中期(即它正在使用该软件,但现在不是)。
我已经读到这很可能是索引器与编译器不匹配的原因,因为编译器工作正常。但是,我没有任何帮助。有人遇到过此问题或类似问题吗?请让我知道是否可以提供其他信息。
感谢您的时间。
编辑:
从Eclipse中的“控制台”选项卡构建日志:
10:26:43 **** Build of project Reader-Debug@build_eclipse ****
"C:\\mingw-w64\\x86_64-5.3.0-posix-seh-rt_v4-rev0\\mingw64\\bin\\mingw32-make.exe" all
"C:\Program Files\CMake\bin\cmake.exe" -HC:\Users\ryan\Documents\GitHub\reader\src -BC:\Users\ryan\Documents\GitHub\reader\build_eclipse --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start C:\Users\ryan\Documents\GitHub\reader\build_eclipse\CMakeFiles C:\Users\ryan\Documents\GitHub\reader\build_eclipse\CMakeFiles\progress.marks
C:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
C:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/mingw32-make -f CMakeFiles\adr.dir\build.make CMakeFiles/adr.dir/depend
mingw32-make[2]: Entering directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" C:\Users\ryan\Documents\GitHub\reader\src C:\Users\ryan\Documents\GitHub\reader\src C:\Users\ryan\Documents\GitHub\reader\build_eclipse C:\Users\ryan\Documents\GitHub\reader\build_eclipse C:\Users\ryan\Documents\GitHub\reader\build_eclipse\CMakeFiles\adr.dir\DependInfo.cmake --color=
Scanning dependencies of target adr
mingw32-make[2]: Leaving directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
C:/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/mingw32-make -f CMakeFiles\adr.dir\build.make CMakeFiles/adr.dir/build
mingw32-make[2]: Entering directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
[ 33%] Building C object CMakeFiles/adr.dir/main.c.obj
C:\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\gcc.exe @CMakeFiles/adr.dir/includes_C.rsp -Wall -Wextra -Werror -g -o CMakeFiles\adr.dir\main.c.obj -c C:\Users\ryan\Documents\GitHub\reader\src\main.c
[ 66%] Building C object CMakeFiles/adr.dir/adr.c.obj
C:\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\gcc.exe @CMakeFiles/adr.dir/includes_C.rsp -Wall -Wextra -Werror -g -o CMakeFiles\adr.dir\adr.c.obj -c C:\Users\ryan\Documents\GitHub\reader\src\adr.c
[100%] Linking C executable adr.exe
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\adr.dir\link.txt --verbose=1
"C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\adr.dir/objects.a
C:\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\ar.exe cr CMakeFiles\adr.dir/objects.a @CMakeFiles\adr.dir\objects1.rsp
C:\mingw-w64\x86_64-5.3.0-posix-seh-rt_v4-rev0\mingw64\bin\gcc.exe -Wall -Wextra -Werror -g -Wl,--whole-archive CMakeFiles\adr.dir/objects.a -Wl,--no-whole-archive -o adr.exe -Wl,--out-implib,libadr.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\adr.dir\linklibs.rsp
mingw32-make[2]: Leaving directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
[100%] Built target adr
mingw32-make[1]: Leaving directory 'C:/Users/ryan/Documents/GitHub/reader/build_eclipse'
"C:\Program Files\CMake\bin\cmake.exe" -E cmake_progress_start C:\Users\ryan\Documents\GitHub\reader\build_eclipse\CMakeFiles 0
10:26:44 Build Finished. 0 errors, 0 warnings. (took 1s.66ms)
Eclipse中的“问题”标签: