我正在尝试在使用CMake和MSVC构建的项目中使用GetText,以x64。我们需要集成GetText以本地化我们的应用程序(作为共享库)。我们遇到麻烦,可以使用MSVC_X64获得编译版本。
我们已经尝试了以下选项:
- donwload来自 https://download.gnome.gnome.gnome.orgg/binaries/ win32/depentencies/运行时和工具软件包和使用 https://stackoverflow.com/a/a/20038623 。该项目成功地找到了库,但是由于已准备好Win32,因此在链接步骤中失败了。
- 使用,但是Cmake抱怨libintl库,因为此汇编似乎不准备用作其他项目的一部分。
- 使用VCPKG安装getText,但是Libiconv的安装(这是一个依赖项)失败了。此外,我不确定产生的标头和LIB是否适合开发。
- 从 httpps”> https:// ftp。 gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz 。配置订单失败了以下输出:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... :
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '4096' is supported by ustar format... yes
checking whether GID '4096' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-w64-mingw32
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gnulib-local/Makefile
=== configuring in gettext-runtime (/cygdrive/c/Users/User/Downloads/gettext-0.21/gettext-runtime)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local/msvc64' '--host=x86_64-w64-mingw32' 'CC=/home/MariAngelesSantosOli/msvc/compile cl -nologo' 'CFLAGS=-MD' 'CXX=/home/User/msvc/compile cl -nologo' 'CXXFLAGS=-MD' 'CPPFLAGS=-D_WIN32_WINNT= -I/usr/local/msvc64/include' 'LDFLAGS=-L/usr/local/msvc64/lib' 'LD=link' 'NM=dumpbin -symbols' 'STRIP=:' 'AR=/home/MariAngelesSantosOli/msvc/ar-lib lib' 'RANLIB=:' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... :
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-w64-mingw32-gcc... /home/User/msvc/compile cl -nologo
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/Users/User/Downloads/gettext-0.21/gettext-runtime':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: error: ./configure failed for gettext-runtime
我感谢任何指南的建议,都可以为MSVC_X64编译GetText-runtime
I am trying to use gettext in a project that is build using cmake and msvc for x64. We need to integrate gettext to localize our application (as shared library). We are having troubles to get a compiled version with msvc_x64.
We have tried the following options:
- Donwload from https://download.gnome.org/binaries/win32/dependencies/ the runtime and tools packages and use as suggested in https://stackoverflow.com/a/20038623. The project sucessfully finds the libraries, but fails in the link step since they are prepared for win32.
- Use a compiled version found in https://mlocati.github.io/articles/gettext-iconv-windows.html, but CMake complains about the libintl library since this compilation seems not be prepared to be use as part of other projects.
- Use vcpkg to install gettext, but the installation of libiconv (which is a dependency) fails. Additionally, I am not sure if headers and libs produced will be suitable for development.
- Compile manually as indicated in gettext README from https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.gz. The configure order fails with the following output:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... :
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '4096' is supported by ustar format... yes
checking whether GID '4096' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-w64-mingw32
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gnulib-local/Makefile
=== configuring in gettext-runtime (/cygdrive/c/Users/User/Downloads/gettext-0.21/gettext-runtime)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local/msvc64' '--host=x86_64-w64-mingw32' 'CC=/home/MariAngelesSantosOli/msvc/compile cl -nologo' 'CFLAGS=-MD' 'CXX=/home/User/msvc/compile cl -nologo' 'CXXFLAGS=-MD' 'CPPFLAGS=-D_WIN32_WINNT= -I/usr/local/msvc64/include' 'LDFLAGS=-L/usr/local/msvc64/lib' 'LD=link' 'NM=dumpbin -symbols' 'STRIP=:' 'AR=/home/MariAngelesSantosOli/msvc/ar-lib lib' 'RANLIB=:' 'host_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-w64-mingw32-strip... :
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for x86_64-w64-mingw32-gcc... /home/User/msvc/compile cl -nologo
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/Users/User/Downloads/gettext-0.21/gettext-runtime':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: error: ./configure failed for gettext-runtime
I would appreciate any advise of guidelines to be able to compile gettext-runtime for msvc_x64
发布评论