Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8217757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:33:39+00:00 2026-06-07T12:33:39+00:00

I was updating a Scripting Bridge glue file today (for Mail.app), and noticed that

  • 0

I was updating a Scripting Bridge glue file today (for Mail.app), and noticed that the sdp(1) man page reads:

You do not need to create a corresponding implementation file; Scripting Bridge will create the
class implementations at runtime.

That sounds cool, but without implementations for the generated classes I get (as expected):

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_MailApplication", referenced from:
      objc-class-ref in DMBugReportWindowController.o
  "_OBJC_CLASS_$_MailAttachment", referenced from:
      objc-class-ref in DMBugReportWindowController.o
[... more of the same ...]
ld: symbol(s) not found for architecture x86_64`

I don’t want to suppress all undefined symbols, as that could easily mask legitimate issues, so I just used -U (per the ld(1) man page):

Specified that it is ok for symbol_name to have no definition. With
-two_levelnamespace, the resulting symbol will be marked dynamic_lookup
which means dyld will search all loaded images.

(I had to use -Xlinker -U -Xlinker _OBJC_CLASS_$_MailApplication for those flags to reach ld, otherwise clang keeps those arguments for itself.)

Evidently making them dynamic_lookup is the wrong thing to do, because this gives a dynamic link error on launch:

dyld: Symbol not found: _OBJC_CLASS_$_MailApplication
  Referenced from: /Users/jonathon/Library/Developer/Xcode/...
  Expected in: flat namespace
 in /Users/jonathon/Library/Developer/Xcode/...

This also happens if I use -force_flat_namespace -undefined suppress (which I don’t want to use, as above). The Scripting Bridge Programming Guide seems to imply I’m doing things correctly (“Preparing to Code” section), but doesn’t mention this issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:33:41+00:00Added an answer on June 7, 2026 at 12:33 pm

    As the class is dynamically created, you cannot link to it. The class will be registered at runtime but no symbol will be exported and the linker won’t be able to find it.

    You need to replace all messages sent to MailApplication and MailAttachment with messages to NSClassFromString(@"MailApplication") and NSClassFromString(@"MailAttachment").

    [MailApplication class] becomes NSClassFromString(@"MailApplication") and [MailAttachment class] becomes NSClassFromString(@"MailAttachment").

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While updating a datatime column in a table from another table, i noticed that
I have a csv file that I will be regularly updating through a batch
Since updating to the latest JQuery I have noticed that all my getJson calls
When updating the content of a text file, it does not update. Instead, I
Updating a column that is part of your selection criteria should be no problem
after updating my grails app's security plugins, i get the following error when deploying
I'm trying to write a game and implement scripting so that later on in
Updating the TextBox from a Thread that calls a function within a Class does
After updating Ubuntu 10.4, I'm not able to build any projects with errno.h used
Since updating a working MonoTouch 3.x app to MonoTouch 4.0, I have been getting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.