# HG changeset patch # User jingchunzhu # Date 1437779676 25200 # Node ID 8ef79bd0be9a530cfd18793768970ec426024f50 # Parent d8e98030eca9b80fcb7c745914ea216ddc2e961d modify diff -r d8e98030eca9 -r 8ef79bd0be9a seg2matrix/CGData/SegToMatrix.py --- a/seg2matrix/CGData/SegToMatrix.py Fri Jul 24 14:56:37 2015 -0700 +++ b/seg2matrix/CGData/SegToMatrix.py Fri Jul 24 16:14:36 2015 -0700 @@ -1,10 +1,12 @@ - - import ctypes import os base = os.path.dirname(os.path.abspath(__file__)) libFile = base + "/CsegToMatrix.so" + +os.system("rm -f "+ base+"/CsegToMatrix.so") +os.system("g++ -fPIC --shared "+ base +"/CsegToMatrix.cc -o "+ base +"/CsegToMatrix.so") + if os.path.exists(libFile): segLib = ctypes.cdll.LoadLibrary(libFile)