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 6549455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:05:43+00:00 2026-05-25T12:05:43+00:00

I have an OS X 10.6 Mac I’m using as my dev machine. The

  • 0

I have an OS X 10.6 Mac I’m using as my dev machine. The program I wrote works perfectly on the dev machine. However, when I tried to run it on an OS X 10.5 (not sure if that’s relevant) test machine, it crashes on launch.

This is the error I’m getting:

Process:         MyApp[25908]
Path:            /Applications/MyApp.app/Contents/MacOS/MyApp
Identifier:      MyApp
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  launchd [109]

Interval Since Last Report:          17392106 sec
Crashes Since Last Report:           735
Per-App Interval Since Last Report:  0 sec
Per-App Crashes Since Last Report:   8

Date/Time:       2010-08-14 07:50:09.768 -0700
OS Version:      Mac OS X 10.5.8 (9L31a)
Report Version:  6
Anonymous UUID:  1BF30470-ACF2-46C7-B6D5-4514380965C8

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Symbol not found: __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i
  Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp
  Expected in: /usr/lib/libstdc++.6.dylib

So it looks like it’s crashing because it’s loading an incompatible version of the dynamic library libstdc++.6. Is this type of thing ordinary? A search on Google doesn’t really reveal many other programs that have this problem. What should I be doing in my compile to prevent this from happening? Do I need to be somehow including libstdc++ inside of my application bundle?

  • 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-05-25T12:05:43+00:00Added an answer on May 25, 2026 at 12:05 pm

    The solution to this problem is to add the following code to one of your source files:

    // Workarounds for symbols that are missing from Leopard stdlibc++.dylib.
    _GLIBCXX_BEGIN_NAMESPACE(std)
    // From ostream_insert.h
    template ostream& __ostream_insert(ostream&, const char*, streamsize);
    
    #ifdef _GLIBCXX_USE_WCHAR_T
        template wostream& __ostream_insert(wostream&, const wchar_t*, streamsize);
    #endif
    
    // From ostream.tcc
    template ostream& ostream::_M_insert(long);
    template ostream& ostream::_M_insert(unsigned long);
    template ostream& ostream::_M_insert(bool);
    #ifdef _GLIBCXX_USE_LONG_LONG
        template ostream& ostream::_M_insert(long long);
        template ostream& ostream::_M_insert(unsigned long long);
    #endif
    template ostream& ostream::_M_insert(double);
    template ostream& ostream::_M_insert(long double);
    template ostream& ostream::_M_insert(const void*);
    
    #ifdef _GLIBCXX_USE_WCHAR_T
        template wostream& wostream::_M_insert(long);
        template wostream& wostream::_M_insert(unsigned long);
        template wostream& wostream::_M_insert(bool);
        #ifdef _GLIBCXX_USE_LONG_LONG
            template wostream& wostream::_M_insert(long long);
            template wostream& wostream::_M_insert(unsigned long long);
        #endif
        template wostream& wostream::_M_insert(double);
        template wostream& wostream::_M_insert(long double);
        template wostream& wostream::_M_insert(const void*);
    #endif
    
    // From istream.tcc
    template istream& istream::_M_extract(unsigned short&);
    template istream& istream::_M_extract(unsigned int&);  
    template istream& istream::_M_extract(long&);
    template istream& istream::_M_extract(unsigned long&);
    template istream& istream::_M_extract(bool&);
    #ifdef _GLIBCXX_USE_LONG_LONG
        template istream& istream::_M_extract(long long&);
        template istream& istream::_M_extract(unsigned long long&);
    #endif
    template istream& istream::_M_extract(float&);
    template istream& istream::_M_extract(double&);
    template istream& istream::_M_extract(long double&);
    template istream& istream::_M_extract(void*&);
    
    #ifdef _GLIBCXX_USE_WCHAR_T
        template wistream& wistream::_M_extract(unsigned short&);
        template wistream& wistream::_M_extract(unsigned int&);  
        template wistream& wistream::_M_extract(long&);
        template wistream& wistream::_M_extract(unsigned long&);
        template wistream& wistream::_M_extract(bool&);
        #ifdef _GLIBCXX_USE_LONG_LONG
            template wistream& wistream::_M_extract(long long&);
            template wistream& wistream::_M_extract(unsigned long long&);
        #endif
        template wistream& wistream::_M_extract(float&);
        template wistream& wistream::_M_extract(double&);
        template wistream& wistream::_M_extract(long double&);
        template wistream& wistream::_M_extract(void*&);
    #endif
    
    _GLIBCXX_END_NAMESPACE
    

    The underlying issue is that there are several templates that are declared as extern templates in libstdc++ headers, and while their instantiations are provided by libstdc++ on 10.6+, they are not provided by the libstdc++ on 10.5. As a result, when you are using these templates, you wind up successfully linking against the 10.6 SDK for functions not provided by the 10.5 OS, and so dyld craps out on launch. By providing the instantiations yourself, you ensure your code will load on Snow Leopard.

    Alternately, you can

    #define _GLIBCXX_EXTERN_TEMPLATE 0 
    

    in your prefix file, but doing so will cause template code bloat.

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

Sidebar

Related Questions

I have a mac sitting right next to my PC for photoshop/illustrator/flash development. However,
I have a mac, and want to set up Zend Server. I am not
I have a Mac window based application using CoreData and Cocoa bindings to bind
I have a Mac OS X program visible only in status bar that must
I have mac OS X and would like the built-in apache webserver to run.
I have a Mac app I have written to support iCloud. However, I get
I have a Mac with Leopard installed (not Snow Leopard). I'm trying to start
i have mac preinstalled svn at ->/usr/bin/svn i have macport install svn at -->opt/local/var/macports/software/subversion/1.6.3_0/opt/local
I have a mac with a custom PHP 5 install that built from about
I have a mac mini on which I do some iphone and other experimental

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.