Top "C-preprocessor" questions

A textual macro processor applied before compiling C and C++ language programs.

DEBUG macros in C++

I just encountered a DEBUG macro in C that I really like #ifdef DEBUG_BUILD # define DEBUG(x) fprintf(stderr, …

c++ c debugging c-preprocessor
Finding out what the GCC include path is

I'm trying to programmatically find the #include path on Linux, which as I understand it, in practice means finding what …

c linux gcc c-preprocessor
Macro vs Function in C

I always saw examples and cases where using a macro is better than using function. Could someone explain me with …

c function c-preprocessor
#define vs const in Objective-C

I'm new to Objective-C, and I have a few questions regarding const and the preprocessing directive #define. First, I found …

objective-c constants c-preprocessor
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 …

objective-c compiler-construction xcode4 clang c-preprocessor
Including a header file from another directory

I have a main directory A with two sub directories B and C. Directory B contains a header file structures.…

c compiler-errors include c-preprocessor
Understanding container_of macro in the Linux kernel

When I was browsing the Linux kernel, I found a container_of macro which is defined as follows: #define container_…

c linux-kernel c-preprocessor
Is there a portable way to print a message from the C preprocessor?

I would like to be able to do something like #print "C Preprocessor got here!" for debugging purposes. What's the …

printing c-preprocessor
Convert a preprocessor token to a string

I'm looking for a way to convert a preprocessor token to a string. Specifically, I've somewhere got: #define MAX_LEN 16 …

c c-preprocessor stringification