How can I compile 32- and 64-bit DCUs into separate directories?

扶醉桌前 提交于 2019-12-04 06:19:42

The magic you are talking about can be seen in the .dproj file for a plain vanilla XE2 VCL Forms app. The key ingredients are these variables:

  • $(Platform) which can be Win32 or Win64 on Windows.
  • $(Config) which is commonly either Debug or Release.

Then in the .dproj file the following XML performs the magic:

<PropertyGroup Condition="'$(Base)'!=''">
    <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
    <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
</PropertyGroup>

You can use such tricks with the $(Platform) and $(Config) variables with any of the project options. So you just need to use these variables to set whatever option needs to be set for the compiler to find your pre-compiled DCUs.

To the best of my knowledge the option you need to set is the Search Path. Although I admit to being hazy about how the search path works since I personally never rely on search path and always explicitly include all source files in my projects. In your example you would add ctrls\quickpdf\($Platform) to the search path.

That's simple, add:

  • ..\ctrls\quickpdf\$(Platform)

to your projects search path

Although you'll be surprised when you find this actually works since it shows up grayed out in the IDE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!