• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with "Undefined symbols" and wchar_t on Mac OS X 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with "Undefined symbols" and wchar_t on Mac OS X 10.2


  • Subject: Problems with "Undefined symbols" and wchar_t on Mac OS X 10.2
  • From: Dirk Stegemann <email@hidden>
  • Date: Mon, 14 Jun 2004 09:40:21 +0200

Hi all,

I've looked to the archives and found some other postings concerning this problem, but no one came up with a solution.
Maybe someone can shed some light on this issue anyway...


I've eventually moved a ProjectBuilder project with a target for building a dynamically loaded bundle with GCC 2.95 to Xcode to be able to use the GCC 3.3.
I did not convert the project but created a new one with Xcode and added all the files and applied the appropriate settings (at least I hoped so) to get the benefits of distributed compiling, latest compiler bug fixes etc.


Xcode is the latest version (1.2), running in Mac OS X 10.3.4.

Unfortunately, when a client application tries to load my bundle while running in Mac OS X 10.2.x, the loading fails, showing up these errors in the console:

---
CFLog (21): Error loading : error code 7, error number 0 (dyld: /Applications/MyApp.app/Contents/MacOS/MyApp Undefined symbols:
/Library/Application Support/MyBundle.bundle/Contents/MacOS/MyBundle undefined reference to _btowc expected to be defined in /usr/lib/libSystem.B.dylib
/Library/Application Support/MyBundle.bundle/Contents/MacOS/MyBundle undefined reference to _iswctype expected to be defined in /usr/lib/libSystem.B.dylib
/Library/Application Support/MyBundle.bundle/Contents/MacOS/MyBundle undefined reference to _mbsrtowcs expected to be defined in /usr/lib/libSystem.B.dylib
/Library/Application Support/MyBundle.bundle/Contents/MacOS/MyBundle undefined reference to _towlower expected to be defined in /usr/lib/libSystem.B.dylib
/Library/Application Support/MyBundle.bundle/Contents/MacOS/MyBundle undefined reference to _towupper expected to be defined in /usr/lib/libSystem.B.dylib
---


As others have suggested, this is a problem due to Mac OS X 10.2.x not being supporting the wchar_t type.
I have not seen all the sources compiled into the bundle, but because it's a cross-platform project there is frequent use of std::string, std::vector and simliar; usage of wchar_t I cannot find anywhere.
So I suppose there are some dependencies inside the standard libraries or in the Mac OS X System frameworks I'm linking to...


Maybe someone can give some advice how to eliminate the wchar_t dependency from a project which doesn't directly make use of this type, or how I can tweak my project settings to achieve this goal.

I set the "Mac OS X Deployment Target" to "Mac OS X 10.2".
I also read in the archives that one should include the "Mac OS X 10.2 SDK", but I think this is an option for applications only, because I didn't find that option neither in my project's settings nor in the target's settings.


Any help is appreciated.

Greetings,
Dirk Stegemann
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Problems with "Undefined symbols" and wchar_t on Mac OS X 10.2
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re[2]: Viewing Contents Of CFDictionary?
  • Next by Date: Re: a modest proposal
  • Previous by thread: re: Viewing Contents Of CFDictionary?
  • Next by thread: Re: Problems with "Undefined symbols" and wchar_t on Mac OS X 10.2
  • Index(es):
    • Date
    • Thread