在Windows下使用g ++编译c ++程序时,我得到了“未定义的对'SetTextColor @ 8'的引用”错误。完整的错误日志位于http://pastebin.com/DCwHKkeE 我想我错过了一些库文件,但不知道哪些库文件。请帮忙
答案 0 :(得分:3)
SetTextColor
func是根据MSDN文档在gdi32.lib中定义的,因此您需要在mingw中链接libgdi32.a
。
答案 1 :(得分:0)
只需链接libgdi32,它应该是固定的。
override func viewDidLoad() {
super.viewDidLoad()
let butt = createButton.customView as? UIButton
butt?.setTitleColor(.green, for: .normal)
// Do any additional setup after loading the view.
}