Top "Conditional-compilation" questions

Compilation of certain parts of source code will be included/excluded.

What #defines are set up by Xcode when compiling for iPhone

I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want …

ios xcode macos conditional-compilation
Use #ifdefs and #define to optionally turn a function call into a comment

Is it possible to do something like this #ifdef SOMETHING #define foo // #else #define foo MyFunction #endif The idea is …

c++ c c-preprocessor conditional-compilation
How to #ifdef by CompilerType ? GCC or VC++

I used #ifdef Win32 for safe calls alike sprintf_s but now I want to build project with MinGW and …

c conditional-compilation
C# !Conditional attribute?

Does C# have a not Conditional (!Conditional, NotConditional, Conditional(!)) attribute? i know C# has a Conditional attribute: [Conditional("ShowDebugString")] public …

c# conditional-statements conditional-compilation
Which conditional compile to use to switch between Mac and iPhone specific code?

I am working on a project that includes a Mac application and an iPad application that share code. How can …

iphone xcode macos conditional-compilation
Conditional compilation in Python

How to do conditional compilation in Python ? Is it using DEF ?

python conditional-compilation
How do I check if one of multiple macros is defined in a single #ifdef?

I have some C++ code, and want to perform an action if the __APPLE__ or __linux macros are defined. If …

c++ c-preprocessor conditional-compilation
Why is /clr incompatible with /mt and /mtd in Visual Studio?

can anybody please explain for me how and why /clr is incompatible with /mtd ? What is the alternative for this? …

visual-studio visual-c++ visual-studio-2005 c++-cli conditional-compilation
Conditional Java compilation

I'm a longtime C++ programmer, new to Java. I'm developing a Java Blackberry project in Eclipse. Question - is there …

java eclipse conditional-compilation
Conditional compile-time inclusion/exclusion of code based on template argument(s)?

Consider the following class, with the inner struct Y being used as a type, eg. in templates, later on: template&…

c++ templates conditional-compilation compile-time