【问题标题】:MinGW “The procedure entry point libintl_setlocale could not be located …”MinGW “无法定位程序入口点 libintl_setlocale ...”
【发布时间】:2014-12-21 06:30:34
【问题描述】:

我在 Windows 7 64 位下构建项目时遇到问题。我已经在 SO 上看过类似的问题,但没有找到合适的解决方案。当我跑步时:

cmake -v -G "MSYS Makefiles" CMakeLists.txt

它给了我以下输出:

> -- The C compiler identification is unknown
-- Check for working C compiler: c:/MinGW/bin/gcc.exe
-- Check for working C compiler: c:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.0/Modules/CMakeTestCCo
mpiler.cmake:61 (message):
  The C compiler "c:/MinGW/bin/gcc.exe" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programmi
ng/glfw/CMakeFiles/CMakeTmp



  Run Build Command:"C:/MinGW/msys/1.0/bin/make.exe"
  "cmTryCompileExec1735268707/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec1735268707.dir/build.make
  CMakeFiles/cmTryCompileExec1735268707.dir/build

  make[1]: Entering directory
  `/c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMak
eFiles/CMakeTmp'


  "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report
  /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/CMakeFiles
  1

  Building C object
  CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj

  /c/MinGW/bin/gcc.exe -o
  CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c
  /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMake
Files/CMakeTmp/testCCompiler.c


  make[1]: ***
  [CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1

  make[1]: Leaving directory

另外我收到下一条错误消息 3 次,在编译尝试期间,它显示“过程入口点 libintl_setlocale 无法位于库 libintl-8.dll 中”

CMakeError.log:

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:ID标志:-c

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:-Aa

输出为:1 :0:1: error: missing '(' after 谓词

检查 C 编译器是否为 IAR 使用 "" 不匹配 "IAR .+ 编译器”:gcc.exe:致命错误:没有输入文件编译 终止。确定 C 编译器是否工作失败 以下输出:更改目录: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp

运行编译命令:“C:/MinGW/msys/1.0/bin/make.exe” “cmTryCompileExec2453403923/fast”/usr/bin/make -f CMakeFiles/cmTryCompileExec2453403923.dir/build.make CMakeFiles/cmTryCompileExec2453403923.dir/build make[1]:进入 目录 /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/c/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: Leaving directory /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' 制作[1]: * [CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj] 错误 1 制作:* [cmTryCompileExec2453403923/fast] 错误 2

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:ID标志:-c

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:-Aa

输出为:1 :0:1: error: missing '(' after 谓词

检查 C 编译器是否为 IAR 使用 "" 不匹配 "IAR .+ 编译器”:gcc.exe:致命错误:没有输入文件编译 终止。确定 C 编译器是否工作失败 以下输出:更改目录: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp

运行编译命令:“C:/MinGW/msys/1.0/bin/make.exe” "cmTryCompileExec78678067/fast" /usr/bin/make -f CMakeFiles/cmTryCompileExec78678067.dir/build.make CMakeFiles/cmTryCompileExec78678067.dir/build make[1]:进入 目录 /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: make[1]: Leaving directory /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' * [CMakeFiles/cmTryCompileExec78678067.dir/testCCompiler.c.obj] 错误 1 ​​制作:* [cmTryCompileExec78678067/fast] 错误 2

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:ID标志:-c

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:-Aa

输出为:1 :0:1: error: missing '(' after 谓词

检查 C 编译器是否为 IAR 使用 "" 不匹配 "IAR .+ 编译器”:gcc.exe:致命错误:没有输入文件编译 终止。确定 C 编译器是否工作失败 以下输出:更改目录: C:/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp

运行编译命令:“C:/MinGW/msys/1.0/bin/make.exe” “cmTryCompileExec1735268707/fast”/usr/bin/make -f CMakeFiles/cmTryCompileExec1735268707.dir/build.make CMakeFiles/cmTryCompileExec1735268707.dir/build make[1]:进入 目录 /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' "/C/Program Files (x86)/CMake/bin/cmake.exe" -E cmake_progress_report /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj /c/MinGW/bin/gcc.exe -o CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj -c /C/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp/testCCompiler.c make[1]: *** [CMakeFiles/cmTryCompileExec1735268707.dir/testCCompiler.c.obj] Error 1 make[1]: Leaving directory /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' make: *** [cmTryCompileExec1735268707/fast] 错误 2

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:标识标志:

输出为:1

编译C编译器识别源文件 “CMakeCCompilerId.c”失败。编译器:c:/MinGW/bin/gcc.exe 构建 标志:ID标志:-c

输出为:1

也是我的路径环境变量:

C:\Program Files (x86)\PC 连接解决方​​案\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files (x86)\Intel\iCLS 客户端\;c:\Program Files\Intel\iCLS 客户端\;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program 文件 (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program 文件\英特尔\英特尔(R) 管理引擎组件\DAL;C:\Program 文件\英特尔\英特尔(R) 管理引擎组件\IPT;C:\Program Files (x86)\Intel\Intel(R) 管理引擎组件\DAL;C:\Program Files (x86)\Intel\Intel(R) 管理引擎组件\IPT;C:\Program Files\Sony\VAIO Improvement\;C:\Program Files (x86)\Sony\VAIO Startup 设置工具;C:\Program Files (x86)\Windows Live\Shared;c:\Program 文件 (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program 文件\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program 文件 (x86)\MVActiveX\;C:\Java\jdk1.7.0_09\bin;C:\Program Files\Microsoft\Web 平台安装程序\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET 网页\v1.0\;C:\Program Files (x86)\Windows 工具包\8.0\Windows 性能工具包\;C:\Program 文件\Microsoft SQL Server\110\Tools\Binn\;C:\Program 文件\TortoiseHg\;C:\Program 文件\MATLAB\R2013a\runtime\win64;C:\Program Files\MATLAB\R2013a\bin;C:\MinGW\bin;C:\Program Files (x86)\CMake\bin

我安装并重新安装了 mingw 并调查了我的路径变量,但仍然没有解决方案。任何想法,我错在哪里?

【问题讨论】:

    标签: c++ c windows cmake mingw


    【解决方案1】:

    将 libintl-8.dll 放到 System32/SysWOW64 中,它应该可以正常工作。

    【讨论】:

    • 我确实做到了,我也尝试替换它,但没有任何效果
    【解决方案2】:

    这是一个有点无知的猜测,但 libintl-8.dll 的问题可能是由路径问题引起的。在您的路径中的某处,您可能拥有具有不同入口点的旧版本的 lib。确保您拥有最新版本的 MinGW 和所有相关库,然后尝试将 MinGW\bin 移动到路径变量的顶部。

    有关此问题的另一个示例,请参阅:MinGW "The procedure entry point libiconv could not be located ..."

    该链接问题中的答案帮助我解决了我遇到的类似问题。

    【讨论】:

    • 我看到了那个链接,就像其他数千个一样。可悲的是,这对我来说没有帮助。我想,我一开始就有错误的配置。
    【解决方案3】:

    我刚刚找到了答案:我的路径中有另一个 libintl-8.dll。

    从命令行执行此操作:

    where libintl-8.dll
    

    然后重命名除 MinGW 树中的所有这些。

    如果失败,则可能需要重新安装 MinGW 树。祝你好运。

    【讨论】:

    • “where”命令正是我所需要的。我有一个 Lua 安装,它也有那个 dll,这会导致冲突。
    猜你喜欢
    • 1970-01-01
    • 2016-01-20
    • 2016-02-21
    • 1970-01-01
    • 2017-03-27
    • 1970-01-01
    • 1970-01-01
    • 2011-02-20
    • 1970-01-01
    相关资源
    最近更新 更多