Undefined Symbols for architecture i386


#1

Hi,

I have followed the quickstart guide at http://www.shinobicontrols.com/shinobigrids/quickstartguide/

When I try to run the app I get 17 errors related to the subject line. All seem to be related to licensing methods. 

I have looked at the SimpleGrid and LargeDataSet examples and they run OK but use a ShinobiGrid rather than a ShinobiDataGrid as in the quickstart app.

Is there something missing or have I missed a step? I have dragged the ShinobiGrids.embeddedframework folder into the project, rather than ShinobiGrid.framework  (note missing ‘s’). ShinobiGrids.embeddedframework is referenced in the two example projects mentioned above.

UUndefined symbols for architecture i386:

  "_SecItemAdd", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_SecItemCopyMatching", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_SecItemDelete", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

  "_SecKeyGetBlockSize", referenced from:

      -[SGrid_SecKey verifySignature:secKeyRef:signature:] in ShinobiGrids(ShinobiGrids)

  "_SecKeyRawVerify", referenced from:

      -[SGrid_SecKey verifySignature:secKeyRef:signature:] in ShinobiGrids(ShinobiGrids)

  "_kSecAttrApplicationTag", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecAttrKeyClass", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

  "_kSecAttrKeyClassPublic", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

  "_kSecAttrKeyType", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecAttrKeyTypeRSA", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecClass", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecClassKey", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecReturnPersistentRef", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecReturnRef", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecValueData", referenced from:

      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)

      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)

  "_kSecValuePersistentRef", referenced from:

      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)

ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

#2

I have the same problem. Exactly the same, messages, but have used the ShinobiGrids.framework:

Undefined symbols for architecture i386:
  "_SecItemAdd", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_SecItemCopyMatching", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_SecItemDelete", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
  "_SecKeyGetBlockSize", referenced from:
      -[SGrid_SecKey verifySignature:secKeyRef:signature:] in ShinobiGrids(ShinobiGrids)
  "_SecKeyRawVerify", referenced from:
      -[SGrid_SecKey verifySignature:secKeyRef:signature:] in ShinobiGrids(ShinobiGrids)
  "_kSecAttrApplicationTag", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecAttrKeyClass", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
  "_kSecAttrKeyClassPublic", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
  "_kSecAttrKeyType", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecAttrKeyTypeRSA", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecClass", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecClassKey", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecReturnPersistentRef", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecReturnRef", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecValueData", referenced from:
      +[SGrid_License setPublicKey:tag:] in ShinobiGrids(ShinobiGrids)
      -[SGrid_SecKey addPeerPublicKey:keyBits:] in ShinobiGrids(ShinobiGrids)
  "_kSecValuePersistentRef", referenced from:
      -[SGrid_SecKey getKeyRefWithPersistentKeyRef:] in ShinobiGrids(ShinobiGrids)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

#3

I figured it out: You need to add the security.framework, too! That’s it, but it’s not part of the QuickStart Guide.


#4

Alex.Kuehne@gmx.de

I figured it out: You need to add the security.framework, too! That’s it, but it’s not part of the QuickStart Guide.

Thank you.

I then had to add

[selfcreateSomeTestData];

to viewDidLoad