在 Windows 64 位系统上安装 QT Jambi 时遇到问题 [英] Trouble installing QT Jambi on a Windows 64 bit system

查看:22
本文介绍了在 Windows 64 位系统上安装 QT Jambi 时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用 QT Jambi,但我还无法安装它.首先,这是我的系统:

I've been trying to use QT Jambi, but I couldn't manage to install it yet. First of all, this is my system:

Windows 7 家庭高级版 64 位

Windows 7 Home Premium 64 Bit

Java 6 32 位(我经常使用与 Java 64 位版本不兼容的 JDownloader)

Java 6 32 bit (I often use JDownloader which is not compatible with the 64 bit version of Java)

带有 Code::Blocks 的 MinGW C++ 编译器(在设置期间设置所有必需的环境变量)

MinGW C++ compiler that comes with Code::Blocks (which sets all required environmental variables during setup)

我也安装了 CygWin,但我不明白为什么在我得到的错误中提到它...

I also have CygWin installed, but I don't understand why it gets mentioned during the error that I get...

我的第一个想法是尝试 32 位版本,因为我有 32 位 Java,所以我在 Eclipse 中链接了这些库,尝试了教程中找到的经典初学者程序,我收到了这条消息:

My first idea was to try the 32 bit version since I have 32-bit Java, so I linked the libraries in Eclipse, tried the classical beginner program found in a tutorial and I got this message:

java.lang.ExceptionInInitializerError
    at com.trolltech.qt.QtJambiObject.<clinit>(Unknown Source)
Caused by: java.lang.RuntimeException: Loading library failed, progress so far:
Unpacking .jar file: 'qtjambi-win32-msvc2008-4.7.1.jar'
Checking Archive 'qtjambi-win32-msvc2008-4.7.1.jar'
 - skipping because of wrong system: trying to load: 'win32', expected: 'win64'
Loading library: 'QtCore4.dll'...
 - using 'java.library.path'

    at com.trolltech.qt.internal.NativeLibraryManager.loadNativeLibrary(Unknown Source)
    at com.trolltech.qt.internal.NativeLibraryManager.loadQtLibrary(Unknown Source)
    at com.trolltech.qt.Utilities.loadQtLibrary(Unknown Source)
    at com.trolltech.qt.Utilities.loadQtLibrary(Unknown Source)
    at com.trolltech.qt.QtJambi_LibraryInitializer.<clinit>(Unknown Source)
    ... 1 more
Caused by: java.lang.RuntimeException: Library 'QtCore4.dll' was not found in 'java.library.path'=C:Program FilesJavajre6in;C:WindowsSunJavain;C:Windowssystem32;C:    Windows;C:Program Files (x86)NVIDIA CorporationPhysXCommon;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesBroadcomBroadcom 802.11Driver;c:Program Files (x86)Microsoft SQL Server90Toolsinn;C:Program Files (x86)CodeBlocksMinGWin;C:Program Files (x86)QuickTimeQTSystem;C:cygwinin;C:Program FilesMicrosoft Windows Performance Toolkit;.
    at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(Unknown Source)
    ... 6 more
Exception in thread "main"

然后因为它说它需要一个 64 位系统我遵循了 安装指南 并尝试了以下步骤:

Then since it says it expects a 64 bit system I followed the Installation Guide and tried this steps:

1) 下载 QTJambi 源码包

1) Downloaded QTJambi source package

2) 下载原版QT源码包

2) Downloaded original QT source package

3) 环境PATH变量添加C:QTJambiQTqt-qtin"(QT源码包文件夹)

3) Added "C:QTJambiQTqt-qtin" (QT source package folder) to the environment PATH variable

4) 打开 Visual Studio 2005 命令提示符

4) Opened Visual Studio 2005 Command Prompt

5) cd C:QTJambiQTqt-qt

5) cd C:QTJambiQTqt-qt

6) 试过:configure -platform win64-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests

6) Tried: configure -platform win64-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests

但是没有用,错误:invalid option win64-g++ for -platform

But it didn't work, error: invalid option win64-g++ for -platform

7) 试过 configure -platform win32-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests

7) Tried configure -platform win32-g++ -D QT_JAMBI_BUILD -no-qt3support -plugin-manifests

8) 数字 o 用于开源

8) Digit o for open source

9) 接受许可的数字 y

9) Digit y for accepting license

但它也不起作用,出现此错误:

But it doesn't work either, getting this error:

 Running syncqt...
 perl: warning: Setting locale failed.
 perl: warning: Please check that your locale settings:
        LC_ALL = (unset) 
        LANG = "IT"
        are supported and installed on your system.
 perl: warning: Falling back to the standard locale ("C").
 Can't execute /cygdrive/c/QTJambi/QT/qt-qt/bin//syncqt
 syncqt failed, return code 2

有人可以帮忙吗?提前感谢任何人!

Anyone able to help? Thanks in advance to anyone!

推荐答案

此回复试图解释和解决最初的问题(即如何在 64 位 Windows 系统上使用 32 位 QtJambi 二进制分发版).

This response attempts to explain and address the original problem (i.e. how to make use of the 32bit QtJambi binary distribution on a 64bit Windows system).

由于错误的系统而跳过:尝试加载:'win32',预期:'win64'

这是来自 QtJambi 初始化代码的一条消息,它检测到 JVM 的 32/64 位与试图在运行时加载到 JVM 实例的 QtJambi 实现的 32/64 位之间的不匹配.

This is a message from the QtJambi initialization code that detects a mismatch between the 32/64 bit-ness of the JVM and the 32/64 bit-ness of the QtJambi implementation trying to be loaded into the JVM instance at runtime.

在您的情况下,这是由于尝试将 64 位 JVM 与 32 位版本的 QtJambi 一起使用.这不是一个可能的壮举.要解决此问题,请直接在您的系统上找到并安装 Windows 32 位 JVM,以便您拥有文件C:Program Files (x86)Javajre6injava.exe"(您可能已经安装了它,请检查)

In your case this is due to trying to use a 64bit JVM with a 32bit version of QtJambi. This is not a possible feat. To correct the problem find and install directly the Windows 32bit JVM on your system so that you have the file "C:Program Files (x86)Javajre6injava.exe" (you may already have it installed, please check)

当它们都安装在 64 位系统上时,看看它们之间的区别:

When they are both installed on a 64bit system take a look at the difference between:

C:>"C:Program Files (x86)Javajre6injava.exe" -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

C:>"C:Program FilesJavajre6injava.exe" -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

最上面的是32bit JVM;最底层的是64位JVM.

The top one is the 32bit JVM; the bottom one is the 64bit JVM.

现在尝试通过 32 位 JVM 加载您拥有的 QtJambi 二进制版本,您必须明确执行此操作,因为默认的java.exe"应该是 Windows 64 位平台上的 64 位:

Now try loading the QtJambi binary version you have via the 32bit JVM you have to do this explicitly as the default "java.exe" should be the 64bit one on a Windows 64bit platform:

"C:Program Files (x86)Javajre6injava.exe" -cp qtjambi-X.Y.Z.jar;qtjambi-win32-msvc2008-X.Y.Z.jar;myjar.jar  mypackage.MyMain

您需要将 ClassPath (-cp) 上方的命令行修复到您尝试运行的 JAR 和 main() 的位置.

You need to fixup the command line above the ClassPath (-cp) to the locations of your JARs you are attempting to run and the main().

如果由于 UnsatisfiedLinkError 导致应用程序启动时遇到问题,并且您使用的是 msvc2008 版本,请尝试安装Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)"http://www.microsoft.com/download/en/details.aspx?id=5582(注意:有也是 64 位版本,此链接适用于与在 32 位 JVM 上使用 32 位 QtJambi 相关的 32 位版本,如果您还希望 64 位版本搜索标题中带有(x64)"的同一页面而不是微软网站上的(x86)").

If you have problems getting the application to start due to UnsatisfiedLinkError and you are using a msvc2008 build then try installing the "Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)" http://www.microsoft.com/download/en/details.aspx?id=5582 (NOTE: There is also a 64bit version of this as well, this link is for the 32bit version which is relevant to using 32bit QtJambi on a 32bit JVM, if you also want the 64bit version search for the same page with "(x64)" in the title instead of "(x86)" on the microsoft website).

然后重试您的测试.

这篇关于在 Windows 64 位系统上安装 QT Jambi 时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆