Gatekeeper spctl

Submitted by lepton on Mon, 12/04/2017 - 09:28


可能因為 Backdoor.MAC.Eleanor 的出現,Apple 取消了System Preferences > Security & Privacy 中 Gatekeeper 允許執行任何來源應用程式,但是 Gatekeep 是可以用 terminal 來關閉,達到容許執行任何來源應用程式(也包括病毒),請小心使用。

打開 Terminal
輸入 sudo spctl --master-disable

回復 Gatekeeper 功能:
打開 Terminal
輸入 sudo spctl --master-enable


 To check whether is allowed to run on the local system:
           spctl -a /Applications/

     To allow to run on the local system:
           spctl --add --label "My Stuff" /Applications/

c++ build flag cause the stl function symbol different

Submitted by lepton on Tue, 05/24/2016 - 12:43


export CXXFLAGS="-std=c++11 -stdlib=libc++"
export LDFLAGS="-stdlib=libc++"


link to libc++ or libstdc++

the stl function symbol in object file are different in mac with xcode 7

when use std::vector as a argument

the argument symbol is St6vectorIiSaIi linking to libstdc++

the other is St3__16vectorIiNS6_9allocatorIi

this will cause linking errors