2014-03-31, 12:29
Hello everyone, I'm kinda new in xbmc, and Im trying to import a .dll from c++ in the addon.py file. However, after hours of trial and error I get this message:
XBMC.exe': Loaded 'C:\XBMC\system\python\DLLs\_ctypes.pyd', Cannot find or open the PDB file
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.WindowsError'>
Error Contents: (126, 'The specified module could not be found')
Traceback (most recent call last):
File "C:\XBMC\addons\script.service.sum_numbers\addon.py", line 6, in <module>
mydll = windll.LoadLibrary('summation.dll')
File "C:\XBMC\system\python\Lib\ctypes\__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "C:\XBMC\system\python\Lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: (126, 'The specified module could not be found')
-->End of Python script error report<--
Basically my Addon.py looks like this:
import sys
import xbmc, xbmcgui
import xbmcplugin
from ctypes import windll
mydll = windll.LoadLibrary('summation.dll')
print(mydll.sum())
print '------------!!!!! hello world !!!!!!! ----------'
I'm wondering if is actually possible do the above, where the mydll.sum() its just a function written on a .cpp file that outputs a value. Therefore, the my question is fairly simple ... how do we import the dll files from c++ to an addon for xbmc?
Thanks in advance!
Josue
XBMC.exe': Loaded 'C:\XBMC\system\python\DLLs\_ctypes.pyd', Cannot find or open the PDB file
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.WindowsError'>
Error Contents: (126, 'The specified module could not be found')
Traceback (most recent call last):
File "C:\XBMC\addons\script.service.sum_numbers\addon.py", line 6, in <module>
mydll = windll.LoadLibrary('summation.dll')
File "C:\XBMC\system\python\Lib\ctypes\__init__.py", line 443, in LoadLibrary
return self._dlltype(name)
File "C:\XBMC\system\python\Lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: (126, 'The specified module could not be found')
-->End of Python script error report<--
Basically my Addon.py looks like this:
import sys
import xbmc, xbmcgui
import xbmcplugin
from ctypes import windll
mydll = windll.LoadLibrary('summation.dll')
print(mydll.sum())
print '------------!!!!! hello world !!!!!!! ----------'
I'm wondering if is actually possible do the above, where the mydll.sum() its just a function written on a .cpp file that outputs a value. Therefore, the my question is fairly simple ... how do we import the dll files from c++ to an addon for xbmc?
Thanks in advance!
Josue