Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Issue static linking a package with 64 bit program


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Jan 22, 2017 7:26 PM Last Post By: John Baird
John Baird

Posts: 22
Registered: 6/15/09
Issue static linking a package with 64 bit program  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 19, 2017 1:46 PM
I'm in the process of upgrading from XE7 to Berlin 10.1 and am revisiting an issue which I did not resolve last year when first producing 64 bit GUI applications.

I have a package (jrbpanels) used in many programs which statically links when building 32 bit executables. But I cannot get it to statically link when building 64 bit versions, even when I specifically add jrbpanels.a to the project files. Running the programs requires jrbpanels.bpl. Yet I'm also using the 3rd party VirtualTreeView in many programs and it statically links just fine for both 32 and 64 bit executables. Ditto for a couple more 3rd party packages used by just one program. Note that the 3rd party packages are all written in Delphi, whereas mine is in C.

I have tried editing one program's .cbproj file so the entries for jrbpanels exactly match those for one of the 3rd party packages that does statically link correctly in another 64 bit program. Jrbpanels still did not statically link.

What controls whether a package is statically or dynamically linked? Is it a property of the package, or is that determined by the build options set for the program using the package?

TIA, John
John Baird

Posts: 22
Registered: 6/15/09
Re: Issue static linking a package with 64 bit program  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 22, 2017 7:26 PM   in response to: John Baird in response to: John Baird
John Baird wrote:
I'm in the process of upgrading from XE7 to Berlin 10.1 and am revisiting an issue which I did not resolve last year when first producing 64 bit GUI applications.

I have a package (jrbpanels) used in many programs which statically links when building 32 bit executables. But I cannot get it to statically link when building 64 bit versions, even when I specifically add jrbpanels.a to the project files. Running the programs requires jrbpanels.bpl. Yet I'm also using the 3rd party VirtualTreeView in many programs and it statically links just fine for both 32 and 64 bit executables. Ditto for a couple more 3rd party packages used by just one program. Note that the 3rd party packages are all written in Delphi, whereas mine is in C.

I have tried editing one program's .cbproj file so the entries for jrbpanels exactly match those for one of the 3rd party packages that does statically link correctly in another 64 bit program. Jrbpanels still did not statically link.

What controls whether a package is statically or dynamically linked? Is it a property of the package, or is that determined by the build options set for the program using the package?

TIA, John

Some progress. If I build the project using msbuild, the package is statically linked. But if I build using the IDE, it is not. Msbuild creates an ilink64 command incorporating jrbpanel.bpl whereas the IDE creates an ilink64 command incorporating jrbpanel.bpi. Why? The entries for jrbpanels in the cbproj files for 32 and 64 bit builds are identical.

This is looking like an IDE build issue. Any suggestions would be appreciated.

TIA, John
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02