• 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
Do I Need To Link against libdispatch in a C++ program?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Do I Need To Link against libdispatch in a C++ program?


  • Subject: Do I Need To Link against libdispatch in a C++ program?
  • From: Andreas Grosam <email@hidden>
  • Date: Tue, 28 Jan 2014 14:04:55 +0100

In a simple C++  console program, I get random crashes and weird behavior when including dispatch.h and executing dispatch functions, including weird dynamic linker errors.

I feel a bit stupid, but it seems I need to link against libdispatch?  I’ve never done that before in a C++ program and neither for a Cocoa/iOS app, assuming that clang would link against the system frameworks.

I’m sure that it worked before - now I got really random crashes and dynamic linker errors.

Perhaps this has something to do with this “Module”  feature?  It was set to “Enable Modules (C and Objective-C)”. I disabled it, but it didn’t change anything.

When compiling as Objective-C++ (through changing the main.cpp to main.mm) it seems to work.

This is Xcode 5.0.2 and Mac OS X 10.9.1


Any help greatly appreciated!


Andreas
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Do I Need To Link against libdispatch in a C++ program?
      • From: Jean-Daniel Dupas <email@hidden>
  • Prev by Date: Is there a way to add a custom build rule to ALL targets in a project?
  • Next by Date: Re: Do I Need To Link against libdispatch in a C++ program?
  • Previous by thread: Is there a way to add a custom build rule to ALL targets in a project?
  • Next by thread: Re: Do I Need To Link against libdispatch in a C++ program?
  • Index(es):
    • Date
    • Thread