This has probably been asked before, but how can I build an exe or dll with a different name when compiling for 32 or 64 bit?   I guess it will always use the project name for the exe or dll name?

Comments

  1. Better is to emit compiler error for anything other than the two supported targets

    ReplyDelete
  2. David Heffernan This works, but  for Mac OS and Android (iOS is not available),  It tries to compile


    {$IFDEF WIN64}
        {$LIBSUFFIX '64'}
    {$ELSE IF DEFINED(WIN32)}
        {$LIBSUFFIX '32'}
     {$ELSE}
        {$MESSAGE Error 'This project must be compiled with Win32 or Win64 targets'}
    {$ENDIF}

    ReplyDelete
  3. I'd use code like this:

    {$IF Defined(CPUX64)}
      {$LIBSUFFIX '64'}
    {$ELSEIF Defined(CPUX86)}
       {$LIBSUFFIX '32'}
    {$ELSE}
      {$Message Fatal 'This project must be compiled with Win32 or Win64 targets'}
    {$ENDIF}

    ReplyDelete

Post a Comment