麻烦在Windows 64位系统上安装QT占碑麻烦、系统、Windows、QT

2023-09-08 00:14:20 作者:你不娶我干嘛帅给我看

我一直在试图使用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家庭premium 64位

Windows 7 Home Premium 64 Bit

Java 6的32位(我经常使用JDownloader这是不符合64位版本的Java兼容)

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

MinGW的C ++编译器附带code ::块(安装期间,设置所有必需的环境变量)

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 Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:    \Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11\Driver;c:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files (x86)\CodeBlocks\MinGW\bin\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\cygwin\bin;C:\Program Files\Microsoft Windows Performance Toolkit\;.
    at com.trolltech.qt.internal.NativeLibraryManager.loadLibrary_helper(Unknown Source)
    ... 6 more
Exception in thread "main"

然后,因为它表示,预计在64位系统我也跟着安装指南并试用了此步骤:

1)下载QTJambi源码包

1) Downloaded QTJambi source package

2)下载原来的QT源码包

2) Downloaded original QT source package

3)增加了C:\ QTJambi \ QT \ QT-QT \ BIN(QT源码包文件夹中)环境变量PATH

3) Added "C:\QTJambi\QT\qt-qt\bin" (QT source package folder) to the environment PATH variable

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

4) Opened Visual Studio 2005 Command Prompt

5)CD C:\ QTJambi \ QT \ QT-QT

5) cd C:\QTJambi\QT\qt-qt

6)的尝试:配置-platform Win64中 -g ++ -D QT_JAMBI_BUILD -no-qt3support -plugin-清单

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

但它没有工作,误差为的选项无效Win64的-G ++为-platform 的

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

7)尝试配置-platform Win32的 -g ++ -D QT_JAMBI_BUILD -no-qt3support -plugin-清单

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

8)数字o对于开源

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初始化code检测的32/64位岬的JVM和32/64位岬的QtJambi尝试执行之间的不匹配加载到JVM实例的消息在运行时。

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与QtJambi的32位版本。这不是一个可能的技艺。要解决这个问题找到并让你有文件在系统上直接安装Windows 32位JVM的C:\ Program Files文件(x86)的\的Java \ JRE6 \ BIN \ java.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)\Java\jre6\bin\java.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)\Java\jre6\bin\java.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 Files\Java\jre6\bin\java.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)

上面一个是32位的JVM;底部的一个是64位JVM。

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

现在尝试加载QtJambi二进制版本,你通过32位JVM有你必须这样做明确作为默认的java.exe应该是64位一个在在Windows 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)\Java\jre6\bin\java.exe" -cp qtjambi-X.Y.Z.jar;qtjambi-win32-msvc2008-X.Y.Z.jar;myjar.jar  mypackage.MyMain

您需要修正内容上面的类路径(-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构建然后尝试安装微软的Visual C ++ 2008 SP1可再发行组件包(x86)的 http://www.microsoft.com/download/en/details.aspx?id=5582 (注:也是这方面的一个64位版本,以及,该链接的标题是32位版本,这是有关使用32位QtJambi在32位JVM,如果你也想在64位版本的搜索相同的页面(64)而不是在微软的网站(86))。

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).

然后重试测试。