Hi,

Am 14.09.11 23:12 schrieb(en) Michael Klein:
Does that make any sense? The manual resolve doesn't work on OS X unless libexif.dylib is copied/symlinked to the application bundle, because QLibrary doesn't search the standard library paths.

Really? I ran qlandkartegt in ktrace from the terminal on Tiger, and the kdump output says inter alia

--8<----------------------------------------------------------------------
 932 QLandkarte GT NAMI  "/usr/local/lib/libexif.12.dylib"
 932 QLandkarte GT RET   open 3
[...]
 932 QLandkarte GT NAMI  "/usr/local/lib/libexif.dylib"
 932 QLandkarte GT RET   open 8
--8<----------------------------------------------------------------------

The first sequence seems to be related to linking the bundle itself against libexif, whereas the second (which symlinks to /usr/local/lib/libexif.12.dylib) appears exactly 5 times, corresponding to the CWptDB::CWptDB() statements.

yes, you are right. The standard system library paths *are* searched. The reason for my NULL-pointers is simply libexif.dylib not residing in any of them, but in /opt/local/lib instead.

The manual resolve makes IMHO no sense on non-Windows. Can we just assign the real exif functions to the f_exif*-pointers in that block instead, as in the attached patch?

There is a fishy looking statement in CGarminTile.cpp (function CGarminTile::readSubfileBasics()), though:

minno = (void (*)(hdr_tre_t*,QByteArray&))QLibrary::resolve(QDir::home().filePath(CONFIGDIR "mellon.so"),"minno");

Any idea what this one is supposed to do?

Very strange indeed...

--
Michael

#exclude <windows.h>
Index: src/CWptDB.cpp
===================================================================
--- src/CWptDB.cpp      (revision 2972)
+++ src/CWptDB.cpp      (working copy)
@@ -76,11 +76,11 @@
     f_exif_data_foreach_content     = 
(exif_data_foreach_content_t)QLibrary::resolve("libexif-12", 
"exif_data_foreach_content");
     f_exif_content_get_ifd          = 
(exif_content_get_ifd_t)QLibrary::resolve("libexif-12", "exif_content_get_ifd");
 #else
-    f_exif_content_foreach_entry    = 
(exif_content_foreach_entry_t)QLibrary::resolve("libexif", 
"exif_content_foreach_entry");
-    f_exif_data_unref               = 
(exif_data_unref_t)QLibrary::resolve("libexif", "exif_data_unref");
-    f_exif_data_new_from_file       = 
(exif_data_new_from_file_t)QLibrary::resolve("libexif", 
"exif_data_new_from_file");
-    f_exif_data_foreach_content     = 
(exif_data_foreach_content_t)QLibrary::resolve("libexif", 
"exif_data_foreach_content");
-    f_exif_content_get_ifd          = 
(exif_content_get_ifd_t)QLibrary::resolve("libexif", "exif_content_get_ifd");
+    f_exif_content_foreach_entry    = exif_content_foreach_entry;
+    f_exif_data_unref               = exif_data_unref;
+    f_exif_data_new_from_file       = exif_data_new_from_file;
+    f_exif_data_foreach_content     = exif_data_foreach_content;
+    f_exif_content_get_ifd          = exif_content_get_ifd;
 #endif
 #endif
 
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to