MinGW“libintl_setlocale程序入口点未找到...”

5

我在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-8.dll中找不到程序入口点libintl_setlocale”。

CMakeError.log:

编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志:
输出为: 1
编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志: -c
输出为: 1
编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志: -Aa
输出为: 1 :0:1: 错误:缺少谓词中的'('
使用""检查C编译器是否为IAR未匹配"IAR .+ Compiler": 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 创建C对象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]: 离开目录 /c/Users/Sony/Documents/Computer_Graphics/assignment_01/programming/glfw/CMakeFiles/CMakeTmp' make[1]: * [CMakeFiles/cmTryCompileExec2453403923.dir/testCCompiler.c.obj] 错误 1 make: * [cmTryCompileExec2453403923/fast] 错误 2
编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志:
输出为: 1
编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志: -c
输出为: 1
编译C编译器标识源文件"CMakeCCompilerId.c"失败。 编译器: c:/MinGW/bin/gcc.exe 构建标志: 标识标志: -Aa
输出为: 1 :0:1: 错误:缺少谓词中的'('
使用""检查C编译器是否为IAR未匹配"IAR .+ Compiler": 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

此外,我的路径环境变量:

C:\Program Files (x86)\PC Connectivity Solution\;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 Client\;c:\Program Files\Intel\iCLS Client\;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 Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Sony\VAIO Improvement\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;C:\Program Files (x86)\Windows Live\Shared;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MVActiveX\;C:\Java\jdk1.7.0_09\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\TortoiseHg\;C:\Program Files\MATLAB\R2013a\runtime\win64;C:\Program Files\MATLAB\R2013a\bin;C:\MinGW\bin;C:\Program Files (x86)\CMake\bin

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

3个回答

7
我刚刚找到了答案:我的路径中有另一个libintl-8.dll文件。
请在命令行中执行以下操作:
where libintl-8.dll

将其中除了MinGW树中的一个之外的所有内容都重命名。

如果这种方法失败,那么可能需要重新安装MinGW树。祝好运。


“where” 命令正是我所需要的。我安装了一个也有那个 dll 的 Lua,这引起了冲突。 - Kevin P.

1
将libintl-8.dll文件放入System32/SysWOW64文件夹中,应该可以正常工作。

我确实尝试过,也试图替换它,但是都没有起作用。 - TheGreatLamer

0

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

另一个类似问题的例子,请参见:MinGW "The procedure entry point libiconv could not be located ..."

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


我看到了那个链接,和成千上万的其他链接一样。遗憾的是,这对我的情况没有帮助。我猜我一开始的配置就有问题。 - TheGreatLamer

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接