Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7206

ld: symbol(s) not found for classes defined in Swift marked as @objc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:
      None
    • Environment:

      macOS 10.13.3

      Xcode 9.3b4 (9Q127n)

      Old build system

      Toolchain: org.swift.3020180314a

      Debug confguration; no WMO nor new batch mode

      Description

      In the recent master snapshot with toolchain id org.swift.3020180314a, we get symbol not found errors during linking due to Obj-C files not being able to find Objc-class-refs defined in Swift.

       

      The errors all look something like this:

      "_OBJC_CLASS_$_SomeObjCClassDefinedInSwift", referenced from:
      objc-class-ref in ObjCClass1.o
      objc-class-ref in ObjCClass2.o
      …

       

      I ran into this trying to help test the new batch mode that was announced here, however this was not using the new batch mode.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              benasher44 Ben A
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: