Welcome, Guest
Username: Password: Remember me
Discussions for CodeTyphon Object Pascal Programming Language
  • Page:
  • 1

TOPIC:

Need to determine current host platform 2 months 1 day ago #18381

  • Droid c3p0
  • Droid c3p0's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 22
  • Thank you received: 0
Need something like following example :
if (HostPlatform ="Windows") then
    dll_file := 'libmariadb.dll'
else if (HostPlatform ="Linux") then
    dll_file := 'libmysql57.dll';
MX Linux 23.2;
Typhon version: 8.3
OS: 64 bit MX Linux or 64 bit Windows 11

Please Log in or Create an account to join the conversation.

Last edit: by Droid c3p0.

Need to determine current host platform 2 months 1 day ago #18382

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1076
  • Thank you received: 153
  {$IF DEFINED(MSWINDOWS)} 
  
  {$ELSEIF DEFINED(DARWIN)}

  {$ELSEIF DEFINED(LINUX)}
    
  {$ELSE}
  
  {$ENDIF} 
 
PilotLogic Core Programmer
The following user(s) said Thank You: Droid c3p0

Please Log in or Create an account to join the conversation.

Need to determine current host platform 2 months 1 day ago #18383

  • Vbxler
  • Vbxler's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 66
  • Thank you received: 4
Here you can find a list of possible definitions:
Compiler defines

You can also add your own definitions for debug and release mode:
//{$IFDEF DebugMode}  
                                                   //<--Debugmode
//{$ELSE DebugMode}    
                                                 //<--Releasemode
//{$ENDIF DebugMode}
The following user(s) said Thank You: Droid c3p0

Please Log in or Create an account to join the conversation.

  • Page:
  • 1