Skip to content

Instantly share code, notes, and snippets.

@astj
Last active December 28, 2015 20:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astj/7557748 to your computer and use it in GitHub Desktop.
Save astj/7557748 to your computer and use it in GitHub Desktop.
Way to build programs using gamma with Xcode 4.6.3

Env.

  • Mac!
  • gamma is already installed
  • You could build programs using gamma with old Xcode.
  • Now Xcode is 4.6.3

Old build settings

First, you need to add /usr/local/lib/gamma-4.1.2/i686-apple-darwin8-gnu/libgamma.dylib to your project.

//:configuration = Debug
ARCHS = $(ARCHS_STANDARD_32_BIT)

//:configuration = Release
ARCHS = $(ARCHS_STANDARD_32_BIT)

//:completeSettings = some
ARCHS

//:configuration = Debug
ALWAYS_SEARCH_USER_PATHS = YES

//:configuration = Release
ALWAYS_SEARCH_USER_PATHS = YES

//:completeSettings = some
ALWAYS_SEARCH_USER_PATHS

//:configuration = Debug
HEADER_SEARCH_PATHS = /usr/local/include/**
LIBRARY_SEARCH_PATHS = /usr/local/lib/gamma-4.1.2/i686-apple-darwin8-gnu /usr/local/lib/**

//:configuration = Release
HEADER_SEARCH_PATHS = /usr/local/include/**
LIBRARY_SEARCH_PATHS = /usr/local/lib/gamma-4.1.2/i686-apple-darwin8-gnu /usr/local/lib/**

//:completeSettings = some
HEADER_SEARCH_PATHS
LIBRARY_SEARCH_PATHS

what's up?

Some programs are successfully build with above settings, but some are not.

Error message is like :

/usr/local/include/gamma-4.1.2/GamIO/BinIOBase.h:87:15: No type named '_Ios_Openmode' in namespace 'std'

It's...

#if (__GNUG__ == 3 || __GNUG__ ==4 )
   const std::_Ios_Openmode Int2Mode(int mode);
#else
   int Int2Mode(int mode);
#endif

Some gcc specific definition make error??

How to resolve

Modify build settings like (see also appended PNG):

//:configuration = Debug
CLANG_CXX_LIBRARY = libstdc++

//:configuration = Release
CLANG_CXX_LIBRARY = libstdc++

//:completeSettings = some
CLANG_CXX_LIBRARY

Default C++ Standard library is libc++ (LLVM), but changing this into libstdc++ (GNU) will make build fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment