All Questions

33
votes
3answers
4580 views

How to remove "noise" from GCC/clang assembly output?

I want to inspect the assembly output of applying boost::variant in my code in order to see which intermediate calls are optimized away. When I compile the following example (with GCC 5.3 using g++ -...
263
votes
13answers
57171 views

clang error: unknown argument: '-mno-fused-madd' (python package installation failure)

I get the following error when attempting to install psycopg2 via pip on Mavericks 10.9: clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future] Not ...
53
votes
2answers
24535 views

static variable link error

I'm writing C++ code on a mac. Why do I get this error when compiling?: Undefined symbols for architecture i386: "Log::theString", referenced from: Log::method(std::string) in libTest....
237
votes
7answers
84144 views

How do I print a list of "Build Settings" in Xcode project?

Alternate Titles List of Xcode build variables Print a list of Xcode Build Settings Clang Environment Variables Canonical list of Xcode Environment Variables Is there a Canonical list of Xcode Env...
94
votes
14answers
79419 views

Compile, Build or Archive problems with Xcode 4 (and dependencies)

This question has evolved over the past several weeks to cover more general issues with xcode4 (and upgrading projects form older xcodes). However many of the issues can be solved by following the sa...
473
votes
31answers
296148 views

Why is this program erroneously rejected by three C++ compilers?

I am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've rea...
60
votes
1answers
21185 views

Why can't clang with libc++ in c++0x mode link this boost::program_options example?

Compiling this example code for boost::program_options: http://svn.boost.org/svn/boost/trunk/libs/program_options/example/first.cpp ...on MacOS Lion (10.7.2), using boost-1.48.0 installed with MacPor...
57
votes
3answers
45977 views

Clang optimization levels

On gcc, the manual explains what -O3, -Os, etc. translate to in terms of specific optimisation arguments (-funswitch-loops, -fcompare-elim, etc.) I'm looking for the same info for clang. I've looked...
81
votes
4answers
65851 views

Can I use C++11 with Xcode?

I am considering the use of some C++11 features (like auto for instance) in some cross-platform projects (Windows+Mac). On Windows, Visual Studio supports parts of the upcoming C++11 standard that wou...
161
votes
3answers
78888 views

ARC and bridged cast

With ARC, I can no longer cast CGColorRef to id. I learned that I need to do a bridged cast. According clang docs: A bridged cast is a C-style cast annotated with one of three keywords: (__br...

Previous Next