conditional-compilation Questions
2
Example:
#ifdef FREE_VERSION
tf.text = @"Free";
NSLog(@"FREE VERSION");
#else
tf.text = @"Paid";
NSLog(@"PAID VERSION");
#endif
The first part looks fine in Xcode.
tf.text = @"Free";
NSLo...
Caravel asked 10/12, 2011 at 23:37
1
Solved
Is there a way to ask the compiler if ARC is turned on, and then conditionally compile based upon that value? For example, I have a protocol:
@protocol ProtocolA
@required
-(void)protocolMethodOn...
Enamour asked 9/12, 2011 at 14:41
3
Solved
Consider the following snippet:
requires
designide,
rtl,
vcl,
{$IF RTLVersion < 19.0} // E2026 Constant expression expected
//{$IF CompilerVersion = 22.0} // same as above
vcljpg;
{$ELSE...
Ostrogoth asked 29/11, 2011 at 3:58
2
Solved
I'd like to set the optimize flag (python -O myscript.py) at runtime within a python script based on a command line argument to the script like myscript.py --optimize or myscript --no-debug. I'd li...
Anagnos asked 23/9, 2011 at 9:42
1
Solved
Reading this post here on stackoverflow want to load a different css when compiling for release mode.
Code:
@{ #if (Debug)
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" typ...
Parental asked 17/8, 2011 at 14:36
6
Is there a best practice for supporting dependencies on C/C++ preprocessor flags like -DCOMPILE_WITHOUT_FOO? Here's my problem:
> setenv COMPILE_WITHOUT_FOO
> make <Make system reads envi...
Fungicide asked 28/7, 2011 at 18:12
1
Solved
I am creating a framework right now that can work with CoreData if you would like. The framework has functionality outside of CoreData as well. How can I wrap all the CoreData specific code in IfDe...
Hanan asked 20/7, 2011 at 17:26
3
Solved
I'm trying to write classes which handle different number types. I know that C# (and .Net in general, I believe) has no INumber interface, so I cannot use something like the following:
public cla...
Vaientina asked 1/7, 2011 at 15:44
6
Solved
How to do conditional compilation in Python ?
Is it using DEF ?
Antiserum asked 18/2, 2009 at 6:26
3
I'm learning about conditional compilation and I think that I understand it well so far. Now, if I have the code:
#ifdef UMP_TO_FILE
//do something here...
#endif
and I run:
gcc myprogram.c...
Leialeibman asked 14/6, 2011 at 1:42
5
Solved
Consider the following class, with the inner struct Y being used as a type, eg. in templates, later on:
template<int I>
class X{
template<class T1>
struct Y{};
template<class T1...
Duodenitis asked 14/4, 2011 at 5:46
2
I'm trying to figure out which of the additions to the algorithm headers are supported by a given implementation (gcc and MSVC would be enough).
The simple way would be to do it the same way as on...
Noonday asked 23/5, 2011 at 10:21
1
Solved
I'm using XCode 4, and in my project build settings, I've set :
Preprocessor macros
Debug DEBUG;FULL
Release FULL
and in another target of the same project :
Preprocessor macros
Debug DEBUG;...
Sporangium asked 5/4, 2011 at 19:36
1
I have an application for Android which comes in two forms: a trial version and a paid "pro" version. The two versions coexists in Android Market and have different package names (let's call them c...
Exuberate asked 26/3, 2011 at 17:28
2
Solved
Possible Duplicate:
Conditional compilation and framework targets
I have some code that works in .NET 4, but it does not work in .NET 3.5. In .NET 3.5 it requires to use int...
Clan asked 3/2, 2011 at 18:23
3
Solved
I'm developing a technical library class that can be used on both types of Frameworks (Compact or not).
What is the best way to develop such library? Using by default the .NET features (for XP Emb...
Istanbul asked 27/12, 2010 at 9:2
1
Solved
In a Cocoa application, I'd like to use conditional compilation, like:
#if MACOSX_DEPLOYMENT_TARGET <= MAC_OS_X_VERSION_10_4
[[NSFileManager defaultManager] removeFileAtPath:path handler:nil]...
Abiogenesis asked 6/12, 2010 at 15:33
1
Solved
suppose I have a long algorithm which I would like to be optionally verbose to debug it. So far I just added many if verbose then printf "whatever" all around the code but this forces the code to e...
Tarry asked 1/9, 2010 at 3:43
1
Solved
I know that if I mark code as DEBUG code it won't run in RELEASE mode, but does it still get compiled into an assembly? I just wanna make sure my assembly isn't bloated by extra methods.
[Conditio...
Hetzel asked 13/8, 2010 at 13:41
4
Solved
I would like to write a cross-platform function in C++ that contains system calls. What conditional compilation flags can I check to determine which operating system the code is being compiled for?...
Tanyatanzania asked 24/5, 2009 at 21:56
2
Solved
I have a bunch of unit tests that need to be conditional compiled based on Windows OS version.
This unit tests are testing TxF that is only available in Windows Vista and above.
#if WIN_OS_VERSION...
Ci asked 13/5, 2010 at 23:27
3
Solved
Linux has this nice function dprintf:
The functions dprintf() and vdprintf() (as found in the glibc2 library) are exact analogues of fprintf() and vfprintf(), except that they output to a file d...
Nannie asked 21/1, 2010 at 22:45
8
Solved
My C project uses preprocessor directives to activate / deactivate some features. It's not unusual to find some of the less common configurations do not compile anymore due to a change made a...
Vulgar asked 6/1, 2010 at 11:19
5
Solved
To follow from my previous question about virtual and multiple inheritance (in a cross platform scenario) - after reading some answers, it has occurred to me that I could simplify my model by keepi...
Calabro asked 2/1, 2010 at 0:22
10
Solved
Windows provides only GetTickCount up to Windows Vista and starting from that OS also GetTickCount64. How can I make a C program compile with calls to different functions?
How can I make a C compi...
Refresher asked 18/6, 2009 at 13:4
© 2022 - 2024 — McMap. All rights reserved.