Skip to content

Commit

Permalink
os.add_dll_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-s committed Dec 13, 2024
1 parent 93eb181 commit 3f7b943
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ jobs:
MSYS_PATH_TYPE: inherit
shell: pwsh
run: |
$env:PATH="$env:PATH;$env:LIBSBCL_PATH;D:\a\_temp\msys64\mingw64\bin"
$env:MINGW64_PATH="D:\a\_temp\msys64\mingw64\bin"
$env:PATH="$env:PATH;$env:LIBSBCL_PATH;$env:MINGW64_PATH"
D:\a\_temp\setup-msys2\msys2.CMD -c '$SBCL_SRC/run-sbcl.sh --load script.lisp --quit'
pushd libcalc
mkdir build
Expand Down
1 change: 1 addition & 0 deletions examples/libcalc/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

if platform.system() == 'Windows':
os.add_dll_directory(os.environ.get('LIBSBCL_PATH'))
os.add_dll_directory(os.environ.get('MINGW64_PATH'))

from ctypes import *
import calc as libcalc
Expand Down
8 changes: 5 additions & 3 deletions examples/libcalc/exhaust_heap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from ctypes import *
from ctypes.util import find_library
import os
import platform

print(find_library("sbcl_librarian"))
if platform.system() == 'Windows':
os.add_dll_directory(os.environ.get('LIBSBCL_PATH'))
os.add_dll_directory(os.environ.get('MINGW64_PATH'))

import sbcl_librarian.wrapper
import calc as libcalc
Expand Down

0 comments on commit 3f7b943

Please sign in to comment.