Difficult-Rocket/try/c/dll_builder.py

21 lines
625 B
Python
Raw Normal View History

2022-05-03 13:59:15 +08:00
# -------------------------------
# Difficult Rocket
# Copyright © 2021-2022 by shenjackyuanjie
# All rights reserved
# -------------------------------
import os
import sys
import getopt
2022-05-03 13:59:15 +08:00
# input_args = sys.argv
# print(input_args)
filename = "./data_types.c"
dllname = "./data_types.dll"
python_include_path = "C:/Users/shenjack.SHENJACK-5600X/AppData/Local/Programs/Python/Python38/include/"
os.system("gcc -I {} -shared {} -o {}".format(python_include_path, filename, dllname))
# gcc -I C:/Users/shenjack.SHENJACK-5600X/AppData/Local/Programs/Python/Python38/include/ -shared .\data_types.c -o .\data_types.dll