Jpeg support on different systems
-
Hi everyone,
I have designed (with a friend of mine) a free mathematical software which deals with images at some point (you can try it following this link : http://cloud.github.com/downloads/seub/CirclePackings/install.html, although this release is a temporary version)
The software was deployed on Linux, Mac and Windows with dynamic linking.
When dealing with images, the user can load an image from his files; the program uses the Qimage::load() function.
This function fails sometimes (returns false, in this case nothing works), it seems that:
- On Linux systems, it works fine both on the computer where Qt was installed and the program was compiled etc, and on other "Qt - free "computers.
- On Mac systems, it works fine on the computer where Qt was installed and the program was compiled etc, but not on other "Qt - free "computers.
- On Windows systems, same as for Mac systems.
Do you have any idea what's going wrong and how I can fix this?
Thanks in advance!Here is some additional info that may be relevant:
- Software was compiled dynamically. For Linux users, we ask to install the dependencies. For Mac, we used macdeployqt. For windows, we just included the dependent DLLs. As far as we could tell, the only dependencies are Qt4Core and QtGui (or something) libraries. Actually, I just remembered that I requested from Linux users to install the libqt4-dev library (instead of the two previously mentioned), which installs a bunch of other libraries, maybe this is why it works fine for Linux users?
- No, I haven't checked if Qt was compiled using the option -qt-libjpeg on my different systems, but if that were the problem then why would it work on my "native" computers? Moreover, I really want to avoid compiling Qt myself, trying to do this has been a great source of hell.
-
I don't know about the Mac, but on windows you need to deploy relevant dll's along with your app. In this case, apart from the mentioned core and gui library - a jpeg library dll located in <QtDir>\plugins\imageformats.
So, in short - make sure you deploy <wherever your exe is>\imageformats\qjpeg4.dll -
Cool, I'll try that. Thank you!
Anyone has an idea how to make things work on Mac?
-
Have you looked at this page? http://qt-project.org/doc/qt-4.8/deployment-mac.html#the-mac-deployment-tool
Have a read. The idea is the same. You need to deploy your plugins. I'm not familiar with mac environment but this page seems to have comprehensive info about how to do it. -
Actually, it's not comprehensive at all, there's nothing there. Note that there is written "The Image format plugins are always deployed.", so, somthing seems to be going wrong.
-
Anyone ?
It seems macdeployqt is not doing anything with libqjped.dylib, when it should, but I really understand nothing about this.