Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Win32 VC10.0
What is equivalent of #ifdef ... #endif flags in .odl files? Is it possible that in odl file, we shall have interface methods which are compiled conditionally ?
 
e.g.
interface {
 
methods:
   HRESULT func1([in] inputvar, [out] outvar);
   HRESULT func2([in] inputvar, [out] outvar);
   
   #ifdef THIRDPARTYDLL
   HRESULT func11([in] inputvar, [out] outvar);
   HRESULT func21([in] inputvar, [out] outvar);
   #endif
}
I am using a third-party library for which I have limited run-time and developer licenses. Some of the interface methods are in direct support of library methods.
 
On some machines where I have license installed, I want to compile with flag on and on other machines, I want to compile with flag off.
 
How this can be achieved? Also, it is possible to use a flag which defined in source files, in IDL file? In visual studio, there are facilities for defining pre-processor in project. But set of preprocessors for C/C++ source files and for MIDL files is different? can they be shared or can they be inherited from some common place?
Posted 23-Mar-11 0:46am
Edited 23-Mar-11 2:24am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 295
1 OriginalGriff 273
2 Aajmot Sk 234
3 Marcin Kozub 205
4 Richard MacCutchan 200
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 25 Mar 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100