IceCold
IceCold

Reputation: 21144

Setting path for x64 projects

Let's say that I have these 2 packages and 1 app:

C:\P1\P1.dpk
C:\P2\P2.dpk
C:\App1\App1.dpr

P2 uses P1.
App1 uses P1 and P2.

Under Delphi XE I complied P1 and added its path in 'Tools-> Options-> Library path'. Then I did the same for P2.
At this moment App1 would be compilable (it will use the 'Library path' to find the source code for P1 and P2). No other settings (search path, etc) would be necessary.

That was only for the Win32 platform. Now, under Delphi XE7, I added also the Win64 platform (to all projects). And the things really screwed up.

I understand that:
1. I need to compile the packages for both platforms.
2. I need to install the packages ONLY for Win32 (since Delphi is a 32 bit app).
3. I need to use '.\$(Platform)\$(Config)' in 'All configurations/All platforms' in Project Options so I could get the output DCUs in 4 different folders (Debug 32, Debug 64, Release 32, Release 64).

Adding this in the search path of App1: 'c:\p1\$(Platform)\$(Config)' makes it work. But... this means I have to add ALL package paths to all my projects??????

My problem is that I have more than 2 packages as I shown in the above example (it is more like P1 to P10). To add all those paths in the search path of all DPR projects would be a nasty solution. There is a better way? Maybe like adding the paths in the 'Library path'? This way my old projects would work as before, without setting additional strings in 'Search path'.

Upvotes: 0

Views: 385

Answers (1)

kludg
kludg

Reputation: 27493

A better way is to set unit output directory in the packages' compile options; for example set $(BDSCOMMONDIR)/MyPacks/$(Config)/$(Platform) as the unit output directory for all your packages and add $(BDSCOMMONDIR)/MyPacks/$(Config)/$(Platform) to default project's search path.

Upvotes: 3

Related Questions