15 lines
298 B
Python
15 lines
298 B
Python
|
|
import ctypes
|
|
import os
|
|
|
|
|
|
lib_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'libadder.so')
|
|
c_lib = ctypes.CDLL(lib_path)
|
|
|
|
zahl_a = 33
|
|
zahl_b = 34
|
|
|
|
ergebnis = c_lib.addiere_zahlen(zahl_a, zahl_b)
|
|
|
|
print(f"Zahlen: {zahl_a} + {zahl_b}")
|
|
print(f"Ergebnis von C-Funktion: {ergebnis}") |