Building path independant imagemagick dll under mingw
Posted: 2008-05-26T15:18:13-07:00
Here is my problem, which is certainly simple but is driving me nuts.
I'm building an app under gcc and mingw that I distribute as both source and windows compiled executables. Up to this point, I just compiled my needed libraries from sources, and, for the windows executables, I distributed a zip containing my program and all those libraries as dll. I don't want to mess with users registry, and it works wonders.
So since I need ImageMagic, I figured I just do the same. This works well but for one thing : I just can't make modules to load.
I have tried everything under the sun, putting a lib/ImageMagick-6.4.1/modules-Q16/coders under my program's directory, compiling ImageMagick with --disable-installed, with --enable-emdebbed, with ltdl (and all combinaison of that) putting the modules .dll in the same directory as my program, everything I could think of or read at the ressources page, but nothing works. It seems (by running some of imagemagick executables with -debug all, or by trying various things) that ImageMagick tries to load for example c:\msys\local\lib\ImageMagick-6.4.1\modules-Q16\coders\png.la, or it tries to load png.la in the current directory etc ... I supposed it should .dll so I modified module.c to load .dll, but no chance.
I just don't know what I am doing wrong or how to make that work. Any help would be greatly appreciated. Thanks in advance.
I'm building an app under gcc and mingw that I distribute as both source and windows compiled executables. Up to this point, I just compiled my needed libraries from sources, and, for the windows executables, I distributed a zip containing my program and all those libraries as dll. I don't want to mess with users registry, and it works wonders.
So since I need ImageMagic, I figured I just do the same. This works well but for one thing : I just can't make modules to load.
I have tried everything under the sun, putting a lib/ImageMagick-6.4.1/modules-Q16/coders under my program's directory, compiling ImageMagick with --disable-installed, with --enable-emdebbed, with ltdl (and all combinaison of that) putting the modules .dll in the same directory as my program, everything I could think of or read at the ressources page, but nothing works. It seems (by running some of imagemagick executables with -debug all, or by trying various things) that ImageMagick tries to load for example c:\msys\local\lib\ImageMagick-6.4.1\modules-Q16\coders\png.la, or it tries to load png.la in the current directory etc ... I supposed it should .dll so I modified module.c to load .dll, but no chance.
I just don't know what I am doing wrong or how to make that work. Any help would be greatly appreciated. Thanks in advance.