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

TOPIC:

Need to determine current host platform 7 months 3 weeks ago #18381

  • Droid c3p0
  • Droid c3p0's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • 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.4
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 7 months 3 weeks ago #18382

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
  {$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 7 months 3 weeks ago #18383

  • Vbxler
  • Vbxler's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 68
  • 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