I am trying to compile a workspace of 3 projects with C++11 support. This set of projects has successfully compiled and linked using LLVM compiler defaults. In addition, the c++ code has previously compiled on a number of compilers including g++, llvm, msvc, sun, irix etc so it is very clean code.
Under the c++ language dialect section of the workspace build settings there are 3 line items:
c language dialect
c++ language dialect
c++ standard library
Using the settings:
c language dialect: compiler default
c++ language dialect: compiler default
c++ standard library: libc++ (LLVM c++ standard library with c++11 support)
I can successfully compile but get many link errors. Some are from our own functions and some are from standard functions. Here is a sample of link errors to standard functions:
(null): "std::string::find_last_of(char const*, unsigned long) const", referenced from: (null): "std::string::size() const", referenced from:
It seemed clear that I was linking to the wrong standard library, so I investigated changing various options above. Changing the dialect to -std=c++11 even broke my compilation. I could not find a combination that worked for me.
Can you suggest what might be wrong?
EDIT: my motivation for doing this is that I want to use std::thread in my c++ code that interfaces with objective-c (and have that c++ code still be portable)