|
|
In Windows, the librairies do not have the same name as in Linux. This prevents the Windows user to use straightforwardly a custom build of the MBsysPy python interface. Some manual modification may solve the problem (current version 1.22.4, Dec 2022).
|
|
|
|
|
|
**MBsysC**
|
|
|
- Compile MBsysC in release mode, with your modification (e.g. the dev branch)
|
|
|
|
|
|
**Main.py of the project**
|
|
|
- insert the path to the build version
|
|
|
```py
|
|
|
# %%===========================================================================
|
|
|
# Packages loading
|
|
|
# =============================================================================
|
|
|
import sys
|
|
|
# Add path to the MBsysC build folder
|
|
|
#sys.path.insert(1, "../../../MBsysC/build/python") #(un)comment this
|
|
|
sys.path.insert(1, "C:/Users/PATH_TO_YOUR_MBSYSC/MBsysC/build/python")
|
|
|
|
|
|
import MBsysPy as Robotran
|
|
|
```
|
|
|
- run the file in a dedicated console (or external).
|
|
|
|
|
|
**Modify the librairies loading***
|
|
|
- In `C:\Users\Timmermans\PATH_TO_YOUR_MBSYSC\MBsysC\build\python\MBsysPy\_mbsysc_loader\loadlibs.py`, update the name of the librairies to load . For instance:
|
|
|
```py
|
|
|
#==============================================================================
|
|
|
# Loading libraries
|
|
|
#==============================================================================
|
|
|
if __OS__ == "Linux":
|
|
|
ctypes.DEFAULT_MODE = ctypes.RTLD_GLOBAL
|
|
|
elif __OS__ == "Windows":
|
|
|
libxml2_2 = numpy.ctypeslib.load_library("libxml2",__LIB_PATH__)
|
|
|
libopenblas = numpy.ctypeslib.load_library("libopenblas.dll",__LIB_PATH__)
|
|
|
elif __OS__ not in ["Darwin"]:
|
|
|
raise ImportError("Unsupported Operating System identifier: "+__OS__)
|
|
|
|
|
|
print(__LIB_PATH__)
|
|
|
libutilities = numpy.ctypeslib.load_library("MBsysC_utilities",__LIB_PATH__)
|
|
|
libloadXML = numpy.ctypeslib.load_library("MBsysC_loadXML",__LIB_PATH__)
|
|
|
libmodules = numpy.ctypeslib.load_library("MBsysC_module",__LIB_PATH__)
|
|
|
``` |
|
|
\ No newline at end of file |