我已经安装了mingw和eclipse-cdt。 我正在尝试编译项目libiec61850:http://libiec61850.com/..
我从here
安装了cmake解压缩libiec61850后,我创建了一个新文件夹build-mingw并启动了以下命令:
cmake .. -G“Eclipse CDT4 - MinGW Makefiles”
命令结束于:
- 生成完成
- 构建文件已写入:E:/libiec61850-0.8.0/build-mingw
之后我将文件夹build-mingw导入eclipse(将文件复制到我的工作区) 当我开始制作目标时:所有它都失败了 有人可以告诉我我做错了什么吗? 以下是CDT的错误行:
17:33:43 **** Build of project libiec61850@build-mingw ****
"C:\\MinGW\\bin\\mingw32-make.exe" all
"C:\Program Files (x86)\CMake\bin\cmake.exe" -HE:\libiec61850-0.8.0 -BE:\libiec61850-0.8.0\build-mingw --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_start E:\libiec61850-0.8.0\build-mingw\CMakeFiles E:\libiec61850-0.8.0\build-mingw\CMakeFiles\progress.marks
C:/MinGW/bin/mingw32-make -f CMakeFiles\Makefile2 all
mingw32-make[1]: Entering directory 'E:/libiec61850-0.8.0/build-mingw'
C:/MinGW/bin/mingw32-make -f src\CMakeFiles\iec61850.dir\build.make src/CMakeFiles/iec61850.dir/depend
mingw32-make[2]: Entering directory 'E:/libiec61850-0.8.0/build-mingw'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_depends "MinGW Makefiles" E:\libiec61850-0.8.0 E:\libiec61850-0.8.0\src E:\libiec61850-0.8.0\build-mingw E:\libiec61850-0.8.0\build-mingw\src E:\libiec61850-0.8.0\build-mingw\src\CMakeFiles\iec61850.dir\DependInfo.cmake --color=
mingw32-make[2]: Leaving directory 'E:/libiec61850-0.8.0/build-mingw'
C:/MinGW/bin/mingw32-make -f src\CMakeFiles\iec61850.dir\build.make src/CMakeFiles/iec61850.dir/build
mingw32-make[2]: Entering directory 'E:/libiec61850-0.8.0/build-mingw'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report E:\libiec61850-0.8.0\build-mingw\CMakeFiles
[ 0%] Building CXX object src/CMakeFiles/iec61850.dir/common/string_map.c.obj
cd /d E:\libiec61850-0.8.0\build-mingw\src && C:\MinGW\bin\g++.exe -DEXCLUDE_ETHERNET_WINDOWS @CMakeFiles/iec61850.dir/includes_CXX.rsp -o CMakeFiles\iec61850.dir\common\string_map.c.obj -c E:\libiec61850-0.8.0\src\common\string_map.c
src\CMakeFiles\iec61850.dir\build.make:54: recipe for target 'src/CMakeFiles/iec61850.dir/common/string_map.c.obj' failed
mingw32-make[2]: *** [src/CMakeFiles/iec61850.dir/common/string_map.c.obj] Error 1
mingw32-make[2]: Leaving directory 'E:/libiec61850-0.8.0/build-mingw'
mingw32-make[1]: *** [src/CMakeFiles/iec61850.dir/all] Error 2
CMakeFiles\Makefile2:1325: recipe for target 'src/CMakeFiles/iec61850.dir/all' failed
mingw32-make: *** [all] Error 2
mingw32-make[1]: Leaving directory 'E:/libiec61850-0.8.0/build-mingw'
Makefile:116: recipe for target 'all' failed
答案 0 :(得分:1)
我找到了构建它的解决方案。我必须将msys bin文件夹的路径添加到路径,然后我简单地提取项目并使用“现有代码作为Makefile项目”导入将其导入eclipse。现在你只需要在项目根目录中运行makefile的所有目标,你就可以将库作为.a文件。