find_library() in ctypes

前端 未结 2 864
Happy的楠姐
Happy的楠姐 2020-12-01 22:35

I am trying to use the command find_library() from ctypes but I\'m getting an error that I don\'t understand its reason. I am working on Windows

This is the code:

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-01 23:03

    Is the library you are searching for located in a common place on your machine. find_library will not perform an arbitrary search for your file system, it looks in specific places that are listed the ctypes/macholib/dyld.py module (see the dyld_find function).

    If your library is in e.g. /usr/lib then it should be found, but if it is in a nonstandard location you will have to add its directory to an environment variable like DYLD_LIBRARY_PATH.

提交回复
热议问题