SenTestCase link error but framework clearly linked

  • I've got this link error:

    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_SenTestCase", referenced from:
          _OBJC_CLASS_$_Tests in Tests.o

    When building my unit test target, but the SenTestFramework was clearly added to the link phase.

    To complicate matters: this is on a colleague's machine. He checked in the changes and I checked them out. The build fails in the same way, but when I go to investigate the target link phase, it's not there. The only thing that appears in the Build Phases tab of BOTH my app and test targets is the Compile Sources phase, and it only shows 2 of 156 items to compile.

    I tried quitting and re-launch Xcode, but it's still messed up. What is suddenly going on???

    --
    Rick
  • I've fixed the project corruption caused by subversion; not sure what happened, but it was a bad merge on update.

    But I still can't get SenTestCase to link:

    Build target Tests

    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_SenTestCase", referenced from:
          _OBJC_CLASS_$_Tests in Tests.o
      "_OBJC_METACLASS_$_SenTestCase", referenced from:
          _OBJC_METACLASS_$_Tests in Tests.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    On May 29, 2013, at 18:04 , Rick Mann <rmann...> wrote:

    > I've got this link error:
    >
    > Undefined symbols for architecture i386:
    > "_OBJC_CLASS_$_SenTestCase", referenced from:
    > _OBJC_CLASS_$_Tests in Tests.o
    >
    > When building my unit test target, but the SenTestFramework was clearly added to the link phase.
    >
    > To complicate matters: this is on a colleague's machine. He checked in the changes and I checked them out. The build fails in the same way, but when I go to investigate the target link phase, it's not there. The only thing that appears in the Build Phases tab of BOTH my app and test targets is the Compile Sources phase, and it only shows 2 of 156 items to compile.
    >
    > I tried quitting and re-launch Xcode, but it's still messed up. What is suddenly going on???
    >
    > --
    > Rick
    >
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Xcode-users mailing list      (<Xcode-users...>)
    > Help/Unsubscribe/Update your Subscription:
    > https://lists.apple.com/mailman/options/xcode-users/<rmann...>
    >
    > This email sent to <rmann...>

    --
    Rick
  • It looks like you’re building a test bundle for iOS Simulator, but you’re trying to link OCUnit (SenTestingKit.framework) for OS X.

    Be sure your test bundle target has $(SDKROOT)/Developer/Library/Frameworks in its FRAMEWORK_SEARCH_PATHS build setting, so it looks in the appropriate SDK for SenTestingKit.framework. (The OS X version isn’t in an SDK, it’s in $(DEVELOPER_FRAMEWORKS_DIR).)

      -- Chris

    On May 29, 2013, at 6:11 PM, Rick Mann <rmann...> wrote:

    > I've fixed the project corruption caused by subversion; not sure what happened, but it was a bad merge on update.
    >
    > But I still can't get SenTestCase to link:
    >
    >
    > Build target Tests
    >
    > Undefined symbols for architecture i386:
    > "_OBJC_CLASS_$_SenTestCase", referenced from:
    > _OBJC_CLASS_$_Tests in Tests.o
    > "_OBJC_METACLASS_$_SenTestCase", referenced from:
    > _OBJC_METACLASS_$_Tests in Tests.o
    > ld: symbol(s) not found for architecture i386
    > clang: error: linker command failed with exit code 1 (use -v to see invocation)
    >
    >
    >
    >
    >
    > On May 29, 2013, at 18:04 , Rick Mann <rmann...> wrote:
    >
    >> I've got this link error:
    >>
    >> Undefined symbols for architecture i386:
    >> "_OBJC_CLASS_$_SenTestCase", referenced from:
    >> _OBJC_CLASS_$_Tests in Tests.o
    >>
    >> When building my unit test target, but the SenTestFramework was clearly added to the link phase.
    >>
    >> To complicate matters: this is on a colleague's machine. He checked in the changes and I checked them out. The build fails in the same way, but when I go to investigate the target link phase, it's not there. The only thing that appears in the Build Phases tab of BOTH my app and test targets is the Compile Sources phase, and it only shows 2 of 156 items to compile.
    >>
    >> I tried quitting and re-launch Xcode, but it's still messed up. What is suddenly going on???
    >>
    >> --
    >> Rick
    >>
    >>
    >>
    >>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Xcode-users mailing list      (<Xcode-users...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> https://lists.apple.com/mailman/options/xcode-users/<rmann...>
    >>
    >> This email sent to <rmann...>
    >
    >
    > --
    > Rick
    >
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Xcode-users mailing list      (<Xcode-users...>)
    > Help/Unsubscribe/Update your Subscription:
    > https://lists.apple.com/mailman/options/xcode-users/<cmh...>
    >
    > This email sent to <cmh...>
  • On May 29, 2013, at 18:18 , Chris Hanson <cmh...> wrote:

    > It looks like you’re building a test bundle for iOS Simulator, but you’re trying to link OCUnit (SenTestingKit.framework) for OS X.
    >
    > Be sure your test bundle target has $(SDKROOT)/Developer/Library/Frameworks in its FRAMEWORK_SEARCH_PATHS build setting, so it looks in the appropriate SDK for SenTestingKit.framework. (The OS X version isn’t in an SDK, it’s in $(DEVELOPER_FRAMEWORKS_DIR).)

    There appears to be no SenTestingKit.framework in the iOS 6.1 group, but there is one in Developer Frameworks. If I add the latter, it adds the wrong search path to FRAMEWORK_SEARCH_PATHS. If I first add $(SDKROOT)/Developer/Library/Frameworks to FRAMEWORK_SEARCH_PATHS, and then try to add the right framework, it still doesn't find it.

    In the settings UI, it renders $(SDKROOT)/Developer/Library/Frameworks as "iphoneos/Developer/Library/Frameworks".

    If I create a new Cocoa Touch Unit Testing Bundle target, it is created with the SenTestKit.framework from "$(DEVELOPER_LIBRARY_DIR)/Frameworks", and has that as the second of two search paths.

    --
    Rick
  • On May 29, 2013, at 8:53 PM, Rick Mann <rmann...> wrote:

    > On May 29, 2013, at 18:18 , Chris Hanson <cmh...> wrote:
    >
    >> It looks like you’re building a test bundle for iOS Simulator, but you’re trying to link OCUnit (SenTestingKit.framework) for OS X.
    >>
    >> Be sure your test bundle target has $(SDKROOT)/Developer/Library/Frameworks in its FRAMEWORK_SEARCH_PATHS build setting, so it looks in the appropriate SDK for SenTestingKit.framework. (The OS X version isn’t in an SDK, it’s in $(DEVELOPER_FRAMEWORKS_DIR).)
    >
    > There appears to be no SenTestingKit.framework in the iOS 6.1 group, but there is one in Developer Frameworks. If I add the latter, it adds the wrong search path to FRAMEWORK_SEARCH_PATHS. If I first add $(SDKROOT)/Developer/Library/Frameworks to FRAMEWORK_SEARCH_PATHS, and then try to add the right framework, it still doesn't find it.

    How are you trying to add the framework? What do you mean by “the iOS 6.1 group”?

    > In the settings UI, it renders $(SDKROOT)/Developer/Library/Frameworks as "iphoneos/Developer/Library/Frameworks”.

    That’s expected. It’ll expand at build time to the full path.

    > If I create a new Cocoa Touch Unit Testing Bundle target, it is created with the SenTestKit.framework from "$(DEVELOPER_LIBRARY_DIR)/Frameworks", and has that as the second of two search paths.

    What version of Xcode are you encountering this with?

      -- Chris
  • On May 29, 2013, at 21:01 , Chris Hanson <cmh...> wrote:

    >> There appears to be no SenTestingKit.framework in the iOS 6.1 group, but there is one in Developer Frameworks. If I add the latter, it adds the wrong search path to FRAMEWORK_SEARCH_PATHS. If I first add $(SDKROOT)/Developer/Library/Frameworks to FRAMEWORK_SEARCH_PATHS, and then try to add the right framework, it still doesn't find it.
    >
    > How are you trying to add the framework? What do you mean by “the iOS 6.1 group”?

    I go to the target->Build Phases->Link Binary With Libraryies, click the '+', and am presented with a sheet with a two folders, labeled "iOS 6.1" and "Developer Frameworks". The latter contains a SenTestingKit.framework, the former does not.

    >> In the settings UI, it renders $(SDKROOT)/Developer/Library/Frameworks as "iphoneos/Developer/Library/Frameworks”.
    >
    > That’s expected. It’ll expand at build time to the full path.

    OK.

    >> If I create a new Cocoa Touch Unit Testing Bundle target, it is created with the SenTestKit.framework from "$(DEVELOPER_LIBRARY_DIR)/Frameworks", and has that as the second of two search paths.
    >
    > What version of Xcode are you encountering this with?

    Version 4.6.2 (4H1003)

    --
    Rick
  • So, instead of picking the SenTestingKit.framework from the presented list, I chose to "Add Other" and navigated to "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/Developer/Library/Frameworks". That contained only one framework, SenTestingKit.framework.

    For some reason, Xcode is showing me OS X's Developer frameworks, not iOS'.

    --
    Rick

    On May 29, 2013, at 21:28 , Rick Mann <rmann...> wrote:

    >
    > On May 29, 2013, at 21:01 , Chris Hanson <cmh...> wrote:
    >
    >>> There appears to be no SenTestingKit.framework in the iOS 6.1 group, but there is one in Developer Frameworks. If I add the latter, it adds the wrong search path to FRAMEWORK_SEARCH_PATHS. If I first add $(SDKROOT)/Developer/Library/Frameworks to FRAMEWORK_SEARCH_PATHS, and then try to add the right framework, it still doesn't find it.
    >>
    >> How are you trying to add the framework? What do you mean by “the iOS 6.1 group”?
    >
    > I go to the target->Build Phases->Link Binary With Libraryies, click the '+', and am presented with a sheet with a two folders, labeled "iOS 6.1" and "Developer Frameworks". The latter contains a SenTestingKit.framework, the former does not.
    >
    >>> In the settings UI, it renders $(SDKROOT)/Developer/Library/Frameworks as "iphoneos/Developer/Library/Frameworks”.
    >>
    >> That’s expected. It’ll expand at build time to the full path.
    >
    > OK.
    >
    >>> If I create a new Cocoa Touch Unit Testing Bundle target, it is created with the SenTestKit.framework from "$(DEVELOPER_LIBRARY_DIR)/Frameworks", and has that as the second of two search paths.
    >>
    >> What version of Xcode are you encountering this with?
    >
    > Version 4.6.2 (4H1003)
    >
    > --
    > Rick
    >
    >
    >
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Xcode-users mailing list      (<Xcode-users...>)
    > Help/Unsubscribe/Update your Subscription:
    > https://lists.apple.com/mailman/options/xcode-users/<rmann...>
    >
    > This email sent to <rmann...>

    --
    Rick
previous month may 2013 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today