小编Ron*_*Ron的帖子

Xcode 14.0 GCC-12 链接器问题

我的 Mac 将 Xcode 更新到版本 14.0。安装新的命令行工具后,我开始遇到ld其附带版本的问题。更具体地说,我有一个使用 g++-12 编译器(通过自制程序安装)编译的项目,当我尝试编译具有以下输出的任何内容时,链接器炸弹会发生:

[  0%] Linking CXX shared library ../../lib/libeckit.dylib
0  0x10675fffa  __assert_rtn + 139
1  0x10659328d  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 4989
2  0x106583f8f  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 207
3  0x1065fa9d4  ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 2036
4  0x1065fdfa0  ___ZN2ld4tool10InputFilesC2ER7Options_block_invoke + 48
5  0x7ff80248534a  _dispatch_client_callout2 + 8
6  0x7ff8024968f5  _dispatch_apply_invoke + 213
7  0x7ff802485317  _dispatch_client_callout + 8
8  0x7ff802494c0c  _dispatch_root_queue_drain + 673
9  0x7ff80249525c  _dispatch_worker_thread2 + …
Run Code Online (Sandbox Code Playgroud)

macos xcode gcc ld

5
推荐指数
1
解决办法
1022
查看次数

如何在 Swift 中更改标签的文本?

我对 Swift 很陌生,但我不知道为什么这不起作用,我正在尝试更改此标签的文本。

import SpriteKit
var counter:Int = 0
class GameScene: SKScene {
    override func didMoveToView(view: SKView) {
        /* Setup your scene here */
        var myLabel = SKLabelNode(fontNamed:"Tahoma")
        myLabel.fontSize = 65;
        myLabel.name = "Button"
        myLabel.position = CGPoint(x:CGRectGetMidX(self.frame), y:CGRectGetMidY(self.frame));
        myLabel.text = String(counter);
        self.addChild(myLabel)
    }

    override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
        /* Called when a touch begins */

        for touch: AnyObject in touches {
            counter++
            var lol = self.childNodeWithName("Button").text=counter
        }
    }

    override func update(currentTime: CFTimeInterval) {
        /* Called before each …
Run Code Online (Sandbox Code Playgroud)

swift

1
推荐指数
1
解决办法
1266
查看次数

标签 统计

gcc ×1

ld ×1

macos ×1

swift ×1

xcode ×1