` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Compile switch based on whether compiling DLL or EXE
1998-05-16 -- Arnor Baldvinsson
 
>I have some code I would like to include only if I am compiling an app as >an EXE. When I switch to DLL I want it to be omitted. Currently I do this by >commenting/uncommenting the code but I get real interesting results when I >forget to comment out this code for an EXE . Is there a way to create an >expression that knows whether we are compiling an EXE or DLL? Let's see... #TEMPLATE(MyExtension,'My extension templates'),Family('ABC') #EXTENSION(CheckTypeOfCompile,'Checking type of compile'),APPLICATION #GLOBALDATA Glo:CompileType STRING(3) #ENDGLOBALDATA #AT(%ProgramSetup) #CASE(%ProgramExtension) #OF('DLL') Glo:CompileType = 'DLL' #OF('EXE') Glo:CompileType = 'EXE' #OF('LIB') Glo:CompileType = 'LIB' #ENDCASE #ENDAT If you want to use this with Clarion templates, just change the Family('ABC') to Family('CLARION') Then you should be able to do something like this: Case Glo:CompileType Of 'DLL' OfOr 'LIB' ! Execute DLL code or LIB (should normally be the same) Of 'EXE' ! Execute EXE code End Try it, let me know if it works:)


Today is May 4, 2024, 5:03 am
This article has been viewed 35121 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: