Hi,
I try to load libjulia.dll dynamically win32 version libjulia.dll on Windows but loadlibrary fails.
using LoadLibrary from C++
It fails on win32 with error:
Unable to load dependent library D:\julia-1.11.3-win32\julia-1.11.3\bin\libjulia-codegen.dll
Same code with x64 build works perfectly (julia and my code).
I can also reproduce using python loading library on win32 (python and julia) it fails:
import os
import ctypes
julia_directory = 'D:/julia-1.11.3-win32/julia-1.11.3/bin'
os.chdir(julia_directory)
print("Current Directory:", os.getcwd())
julia_dll = 'libjulia.dll'
library_path = os.path.abspath(julia_dll)
julia_library = ctypes.CDLL(library_path)
result:
D:\Developpements\Github\nelson-lang\nelson>python
Python 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import ctypes
>>> julia_directory = 'D:/julia-1.11.3-win32/julia-1.11.3/bin'
>>> os.chdir(julia_directory)
>>> print("Current Directory:", os.getcwd())
Current Directory: D:\julia-1.11.3-win32\julia-1.11.3\bin
>>> julia_dll = 'libjulia.dll'
>>> library_path = os.path.abspath(julia_dll)
>>> julia_library = ctypes.CDLL(library_path)
Traceback (most recent call last):
File "<python-input-7>", line 1, in <module>
julia_library = ctypes.CDLL(library_path)
File "C:\WindowsTools\Python313\Lib\ctypes\__init__.py", line 390, in __init__
self._handle = _dlopen(self._name, mode)
~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [WinError 193] %1 n’est pas une application Win32 valide
>>>
same code with python 64 bits and julia 64 bits works.
julia win32 downloaded from: https://julialang-s3.julialang.org/bin/winnt/x86/1.11/julia-1.11.3-win32.zip
Did I miss something ?
Thanks