[ctypes-users] ctypes - loading 'librsvg-2-2.dll'

Tim Grove tim_grove at sil.org
Tue Sep 2 11:47:08 EDT 2008


Thanks Martin (and others) for your advice. No, this solution didn't 
quite work either. Well, the extremely annoying thing is that it DOES 
work on another home pc, but on my laptop which I use for work, it 
doesn't want to know!!! Both are running WinXP Pro. All the dependencies 
and paths "seem" to be okay, but there must still be something that I'm 
missing.

Tim


Martin (gzlist) wrote:
> On 26/08/2008, Tim Grove <tim_grove at sil.org> wrote:
>   
>> Any ideas why a particular dll won't load on Windows XP Pro using
>>  ctypes?
>>     
>
> I'm going to take a stab in the dark here and suggest it's because you
> have multiple (different) copies of iconv.dll on your PATH.
>
>   
>>  l=CDLL(r'D:\SILSign\librsvg-2-2.dll')
>>  Traceback (most recent call last):
>>   File "<input>", line 1, in <module>
>>   File "C:\PYTHON25\LIB\ctypes\__init__.py", line 349, in __init__
>>     self._handle = _dlopen(self._name, mode)
>>  WindowsError: [Error 127] The specified procedure could not be found
>>     
>
> I get this on my current setup, where I've been messing around trying
> to recompile lynx against iconv. I also get a popup saying "The
> procedure entry point libiconv_set_relocation_prefix could not be
> located in the dynamic link library iconv.dll."
>
> Doing this worked for me:
>
> C:\>set PATH=C:\Program Files\Common Files\GTK\2.0\bin
> C:\>"C:\Python24\python.exe" -c "import ctypes; print
> ctypes.CDLL('librsvg-2-2')"
> <CDLL 'librsvg-2-2', handle 68e40000 at bd9b50>
>
> Change the paths to your equivalents and try it, see if you have the
> same or a similar dependency problem.
>
> Martin
>
>   



More information about the Python-list mailing list