conditional-compilation Questions

4

I am trying to modify my Delphi 2010 code to compile in XE7 (and want to retain the ability to compile it in 2010). So in the unit that houses my mainform I added conditional directives. The follow...
Symmetry asked 1/10, 2014 at 23:31

3

Solved

Most other programming languages don't have an end if statement required at the end of conditional statements. if boolean_expression then statement else statement What advantage does including ...
Correctitude asked 12/10, 2017 at 5:16

4

Solved

I'm currently working on a VBA code generator/injector that adds VBA functionality to Excel workbooks by using the VBA Extensibility. This all works fine. However, the original code that is inject...
Micronesian asked 1/11, 2013 at 12:29

3

Solved

I'm writing some semi-portable code and want to be able to detect when I'm compiling for iPhone. So I want something like #ifdef IPHONE_SDK.... Presumably Xcode defines something, but I can't see...
Concision asked 28/9, 2008 at 23:25

3

Solved

I have created a .NET Core R2 class library and have some common code that I use for several different platforms. Some of the code is not valid in the .NET Core platform and so I wish to wrap it a...
Heptastich asked 26/6, 2016 at 16:10

4

Solved

I am trying to achieve something similar to the C# preprocessor. I am aware that Java does NOT have the same preprocessor capabilities, and am aware that there are ways to achieve similar results u...
Alphaalphabet asked 27/3, 2017 at 17:20

4

Solved

Is there a way to include different libraries depending on the operating system with Qt-Creator? In other words, is there an equivalent for the following lines in the .pro file: #ifdef Q_WS_WIN i...
Charentemaritime asked 26/4, 2013 at 7:58

2

Solved

I created a Xamarin Forms app. And inside a new page with a label named "MyLabel". In the code behind for my page I have private void SetUpUI() { #if __IOS__ this.MyLabel.BackgroundColor = Col...

3

Solved

I noticed a strange idiom in openssl source code, here and repeated below: if ((in == NULL) && (passwds == NULL)) { if (1) { (* <---- HERE *) #ifndef OPENSSL_NO_UI /* build a null-ter...
Pruter asked 28/3, 2017 at 8:27

8

Solved

Assuming that MACRO is not defined, are these equivalent #ifdef MACRO Not valid C or C++ code #endif /* Not valid C or C++ code */ In GCC 4.7.1, it seems to be equivalent but are there prepro...
Spit asked 14/6, 2013 at 8:47

3

Solved

Working with a codebase which supports building for multiple Operating Systems, it is only sensible, where modifications for Emscripten are required, to integrate them into the same codebase, with ...
Camel asked 12/6, 2013 at 7:18

1

Solved

I want to have some code only be included when Eclipse is parsing my source tree. At the moment, what I am doing^H^H^H^H^H trying to do is add a custom preprocessor macro - using Eclipse's Help | P...
Atheistic asked 29/12, 2016 at 20:46

2

Solved

How do I parse C# conditional compilation statement using Roslyn. In the following code, I want Roslyn to give the Conditional compilation statement node. public abstract class TestClass { publi...
Nonconformance asked 1/12, 2016 at 13:23

2

Solved

I'm wondering if something like this is possible fn main() { #[cfg(foo)] { println!("using foo config"); } } The context is some code that cannot adequately be tested with just unit tests. I...
Kuban asked 24/6, 2014 at 21:6

1

Solved

Could I use #define preprocessor directive inside #if and #endif, in C# ? e.g. #if !SILVERLIGHT && !__ANDROID__ && !__IOS__ #define SupportsMutex #endif It looks like it works,...
Wendywendye asked 4/10, 2016 at 21:42

2

I have src/bin/linux-only.rs which does some things which work on Linux only (e.g. libc bindings which only exist on Linux). I want to exclude that file from being built on OS X. I started putting...
Clinkstone asked 27/9, 2016 at 19:56

11

Solved

A programmer I respect said that in C code, #if and #ifdef should be avoided at all costs, except possibly in header files. Why would it be considered bad programming practice to use #ifdef in a .c...
Underworld asked 5/12, 2009 at 5:6

2

Solved

I'm trying to use a conditional compilation statement. Beyond defining a function that should only exist in a debug build, I want to define a set of variables/constants/types that only exist in the...
Gond asked 2/9, 2016 at 11:55

6

Solved

Are there any tools that can generate dependency diagrams for Delphi units taking into account conditional compilation directives. I'd like to emphasize that this should be unit dependency diagram,...
America asked 19/6, 2010 at 15:37

4

Solved

Using Coffeescript I need to have a go through a build script anyway to update my .js files, and I have two of them, one for debugging and one for production (one uses Uglify to minimize the files,...

2

Hi I am having 2 VC++ solutions "A" & "B" (VS2008) both are having the same codebase (with just few lines of code different). Using DXVAHD.h in both. dxvahd.h is a standard Microsoft header fi...

3

Solved

Say for instance I have a Visual Studio project with a configuration called "MyConfig" and I have the compilation symbol MY_CONFIG_SYMBOL defined. Is there a macro or command to see if MY_CONFIG_S...
Malchus asked 30/8, 2012 at 15:23

4

Solved

I was working on getting Log4D working in Delphi XE4, and was getting some compile errors because it couldn't find Contnrs in the uses clause, unless I moved it outside the ifdef it was defined in....
Equilibrist asked 16/5, 2014 at 20:33

1

Solved

TL;DR minifyify (the Browserify plugin) makes use of uglify-js but appears to be unable to handle Conditional compilation: compression works uglifyjs alone works for conditional compilation mini...

4

Solved

Say I have a simple nullary template function templated on a single parameter, with two specializations, one for unsigned long, and one for size_t (contents not important): template<typename T&...
Cytogenesis asked 15/2, 2016 at 22:23

© 2022 - 2024 — McMap. All rights reserved.