Hello,

On 03/11/2012 11:06, Kenny Moens wrote:
The contents of the JAR I build (qtjambi-win32-msvc2010-4.8.3.jar) contains the following DLLs:

  * com_trolltech_qt_XYZ.dll, where XYZ is the name of the subsystem
    (i.e. core, gui,...), and without the '1' suffix.
  * qtjambi.dll
  * the necessary DLLs from Qt itself.

When I start my application with this JAR out-of-the-box, I do get these messages:

    Loading library: 'qtjambi1.dll'...

So, these DLLs don't exist. I get the impression wants to load the wrong DLLs.

To be quite clear in how I experience it right now:

*Scenario 1:* clean Qt-Jambi build, no local modifications done.
In this scenario the main issue is that the loading process cannot find the dlls with the '1' suffix, which is obvious, since they don't exist.

*Scenario 2:* same as scenario 1, but now some DLLs copied with the '1' suffix In this scenario the startup fails to load some of the Qt-Jambi DLLs with the message that it cannot find dependent libraries.

*Scenario 3:* same as scenario 2, but now the qtjambi.dll and Qt own DLLs are moved to the PATH (i.e. the same folder as where the application starts).
In this scenario the loading goes OK, but we now get a JVM crash

*Scenario 4:* same as scenario 3, but now with all DLLs in the working directory.

I hope this clarifies a bit the process I've gone through and explains the different problems I've experienced.


I've been doing some further investigations on this and I managed to get rid of the "1" suffix while loading, and as a consequence the JVM crash also went away (don't know how it was related though).

The source patch I've done is attached. I'm not completely sure if this is a safe patch, but at least it seems to resolve the issues I face on Windows.

Currently doing some further testings & checks.

Kind regards,
Kenny
diff --git 
a/src/java/qtjambi/com/trolltech/qt/internal/NativeLibraryManager.java 
b/src/java/qtjambi/com/trolltech/qt/internal/NativeLibraryManager.java
index e10a325..9946849 100644
--- a/src/java/qtjambi/com/trolltech/qt/internal/NativeLibraryManager.java
+++ b/src/java/qtjambi/com/trolltech/qt/internal/NativeLibraryManager.java
@@ -889,7 +889,7 @@ public class NativeLibraryManager {
             dotVersion = "";
         }
         switch (Utilities.operatingSystem) {
-        case Windows: return lib + version + ".dll";  // "foobar1.dll"
+        case Windows: return lib + ".dll";  // "foobar1.dll"
         case MacOSX: return "lib" + lib + dotVersion + ".jnilib";  // 
"libfoobar.1.jnilib"
         case Linux:
         case FreeBSD: return "lib" + lib + ".so" + dotVersion;  // 
"libfoobar.so.1"
@@ -907,7 +907,7 @@ public class NativeLibraryManager {
             dotVersion = "";
         }
         switch (Utilities.operatingSystem) {
-        case Windows: return lib + version + ".dll";  // "foobar1.dll"
+        case Windows: return lib + ".dll";  // "foobar1.dll"
         case MacOSX: return "lib" + lib + dotVersion + ".dylib";  // 
"libfoobar.1.dylib"
         case Linux:
         case FreeBSD: return "lib" + lib + ".so" + dotVersion;  // 
"libfoobar.so.1"
_______________________________________________
Qt-jambi-interest mailing list
Qt-jambi-interest@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-jambi-interest

Reply via email to