Skip to content

Commit

Permalink
microscope/stages/linkam.py: use CDLL instead of WinDLL even on Windo…
Browse files Browse the repository at this point in the history
…ws (#261)
  • Loading branch information
David Miguel Susano Pinto committed Mar 20, 2023
1 parent 85a4448 commit a921847
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions microscope/stages/linkam.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,9 @@ def get_sdk_version():
@staticmethod
def init_sdk():
"""Initialise the SDK and set up event callbacks"""
try:
__class__._lib = ctypes.WinDLL("LinkamSDK.dll")
except:
# Not tested
if os.name == "nt": # is windows
__class__._lib = ctypes.CDLL("LinkamSDK.dll")
else: # assuming Linux. Not tested.
__class__._lib = ctypes.CDLL("libLinkamSDK.so")
_lib = __class__._lib
"""Initialise the SDK, and create and set the callbacks."""
Expand Down

0 comments on commit a921847

Please sign in to comment.