C++ Debug builds broke in Snow Leopard Xcode
STL debug mode is not supported in gcc 4.2 at this time. You can use gcc 4.0 with STL debug mode, or remove the debug mode preprocessor macros from your Debug configuration and keep using gcc 4.2.
Xcode STL C++ Debug compile error
This looks to be another case of _GLIBCXX_DEBUG being broken with gcc 4.2 on Mac OS X.
Your best options look to be to drop _GLIBCXX_DEBUG or to switch to gcc 4.0.
gcc is not working on snow leopard
Reinstall XCode from the Snow Leopard installation media, and when asking what to install, make sure you select command-line tools.
Can ArangoDB be installed on Snow Leopard without using homebrew? If so, how?
An alternative to @fceller's answer, would be to install Boot2Docker on your Mac and run an ArangoDB Docker container.
XCode - Debug configuration removes all GCC 4.2 settings
Rebuilding the project from scratch a third time solved this issue.
There seem to be some settings in XCode projects that can botch the whole thing.
How to build C++ for OSX 10.4, 10.5 and 10.6 in Xcode with dynamic libraries
The 3rd party libraries were built for 10.6 x_64, I needed to rebuild them for 10.4.
I installed the 10.4u sdk by downloading xcode 3.2 and choosing 'install 10.4 support' during the installation process.
After rebuilding each library with GCC 4.0 against the 10.4u sdk, my project compiled successfully.
I also used static libraries so I don't need to include them in the installer.
Including a debug build in a library's Mac OS X SDK
The Mac OS X dynamic linker (dyld
) has a feature for exactly this purpose: DYLD_IMAGE_SUFFIX
. It'll allow you to dynamically load the debug version of any framework or shared library you've linked to. Then you don't need an entirely separate .framework
bundle; simply create another shared library named MyLibrary_debug
. For example, CoreFoundation in Tiger includes debugging and profiling variants (which look like they haven't received security updates, but anyway):
% ls -l /System/Library/Frameworks/CoreFoundation.framework/Versions/A/
total 20080
-rwxr-xr-x 1 root wheel 1M Sep 10 17:55 CoreFoundation*
-rwxr-xr-x 1 root wheel 6M Apr 24 2007 CoreFoundation_debug*
-rwxr-xr-x 1 root wheel 2M Apr 24 2007 CoreFoundation_profile*
With Apple's frameworks as above, the standard "debug" suffix is _debug
. (The "Use [debug] suffix when loading frameworks" setting in the General pane on an executable within Xcode sets DYLD_IMAGE_SUFFIX=_debug
).
You might think using _debug
as well is a good idea, but I suggest you don't, because Apple has broken the _debug
versions of their frameworks on several occasions (some examples). As of Leopard only libSystem
, libmx
and libmathCommon
come with debug variants, but in Snow Leopard they broke again (I ran into this problem myself).
If you pick a different suffix for your debug library, you should not trigger Apple's bugs and still be able to share the rest of your framework (headers, resources, etc.) between the normal and debug variants.
Debugging app crashes with iOS Simulator & XCode 4 halts in main() function, not crash source
Go to the breakpoints panel, and add the bottom left, click the + sign and add an "Exception breakpoint".
Exceptions : All
Break : On throw.
That should solve the problem in most cases.
Retina @2x graphics incorrectly being used on standard-def display (using Snow Leopard / Xcode 4.2 )
It seems as if Snow Leopard or Xcode 4.2 cannot properly combine High Resulotion Artwork into a single .tiff
file?
Set Combine High Resolution Artwork
to NO
in your Target's Build Settings.
IMPORTANT: I then additionally needed to manually delete the previously created .tiffs from my app's bundle. -[NSImage imageNamed:]
prefers the single .tiff to the 2 .pngs, so it will use the .tiff file if it finds it. Make sure it doesn't.
Related Topics
What Does Afx_Manage_State(Afxgetstaticmodulestate()) Do Exactly
How to Determine the Value of Socket Listen() Backlog Parameter
Detect When Network Cable Unplugged
How to Get the Starting/Base Address of a Process in C++
What Does the "::" Mean in "::Tolower"
Handling Ssl_Shutdown Correctly
Using Custom Camera in Opencv (Via Gstreamer)
Specialization of Member Function Template After Instantiation Error, and Order of Member Functions
C++: Std::Move with Rvalue Reference Is Not Moving Contents
Why Are C++ Int and Long Types Both 4 Bytes
Duplicate Const Qualifier Allowed in C But Not in C++
Fast Multiplication/Division by 2 for Floats and Doubles (C/C++)
C++ Dynamic Array Initialization with Declaration
C++ Logon Task Schedule Error: No Mapping Between Account Names and Security Ids Was Done
So_Rcvtime and So_Rcvtimeo Not Affecting Boost.Asio Operations
How to Overload Array Index Operator for Wrapper Class of 2D Array