I have to following directory structure:
MainProject
| ...project files
| rtlsdr\
| | rtlsdr.dll
| | ...other .dll's etc.
I am using the function CDLL() in the library ctypes to load rtlsdr.dll. It works fine when my working directory is rtlsdr\:
$ cd rtlsdr
$ python
> from ctypes import *
> d = CDLL('rtlsdr.dll')
However, when I try to load the file from another directory:
$ cd MainProject
$ python
> from ctypes import *
> d = CDLL('rtlsdr\\rtlsdr.dll')
I get an error:
WindowsError: [Error 126] The specified module could not be found.
What is the problem here?