|
Title:
|
64-bit MidasLib in Update #1
|
Author:
|
Bob Swart |
Posted:
|
10/12/2011 1:53:44 PM
(GMT+1)
|
Content:
|
Delphi XE2 Update #1 included the 64-bit MidasLib unit - however, this introduced another problem. When compiling a 32-bit application that has the MidasLib unit added to the uses clause, you’ll get compiler hints about duplicate strings (actually resource identifiers) in midas.res. And when compiling as a 64-bit application, you’ll get two errors: File not found: midas.res and midas64.res.
To cover the first problem first: if you look inside the MidasLib unit (post Update #1) the following code can be seen in the list of $R and $L lines:If you look closely, you’ll see that midas.res is added regardless of the CPUX86 or not, and then either midas.res is added (in case of CPUX86) or midas64.res. So for a 32-bit target, the midas.res is included twice, which causes the compiler hints. To fix this, place the first <$R midas.res> in comments.
However, we can only recompile the MidasLib.pas file for the 32-bit target, since the required midas.obj, bcd.obj and cpprtl.obj are only those of the 32-bit version, compiled with C++Builder. We cannot fix the hints in the 64-bit edition of the MidasLib.dcu.
The second problem – the compiler error for the 64-bit edition of the MidasLib unit, is related to midas64.res which is not found on my disk. To solve this problem, I just copied the midas.res file from the Embarcadero\RAD Studio\9.0\lib\win32\release directory to the win64\release directory, and placed another copy renamed as midas64.res. This will give me the duplicate string warnings again, but at least I can now compile a 64-bit application that uses the MidasLib unit (so I do not have to ship the 32-bit and/or 64-bit version of the MIDAS.DLL).
|
Back |
|