Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library linking seems incorrect for C++ Win64 Modern #1293

Open
david-millington opened this issue Mar 3, 2025 · 1 comment
Open

Library linking seems incorrect for C++ Win64 Modern #1293

david-millington opened this issue Mar 3, 2025 · 1 comment
Assignees
Labels
Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues!

Comments

@david-millington
Copy link

Hello,

A few months ago I accidentally filed an issue on the wrong repository for VTV, which was archived today: TurboPack/VirtualTreeView#21

I wrote that we had seen reports of issues using the VTV with the new C++ Modern toolchain:

Looking at the report we think that the VirtualTreesCR290.bpl project is linking to some libraries directly from the project itself (expand the Contains folder and you'll see uxtheme.a and uxtheme.lib). Currently libraries linked via the Projects view only support having a single copy, but every C++ platform has a different object file format or bitness -- so libraries that work for legacy Win64 are ELF64 and can't be linked into the COFF Modern toolchain.

The solution for this is auto-linking, likely using #pragma command(lib, ...). We have lots of docs here :) This will let you refer to the same base file name (eg, 'uxtheme') and have the right file linked for every platform, automatically.

There's also generic info on building packages for bcc64x here. Please let me know if I can help!

So, this is the same bug report, hopefully against the correct repo this time ;)

I saw a note in the readme:

Help Needed: Any volunteer that takes care about C++ Builder bugs and packages?
I don't use C++ Builder and my experience with it is very limited. This makes it difficult to take care about bugs that are reported in C++ Builder and to maintain the C++ Builder packages. I would be great if someone would volunteer to do this.

I can't take on maintaining it. But I can have a look. If you have questions I can help with, maybe we can discuss them in this or another thread?

@joachimmarder
Copy link
Contributor

Please let me know if I can help!

Hi @david-millington, first of all it would be great if you could supply repro-steps for the problems you are referring to. In case you already know how to fix the issue, a pull request would be great.

This will let you refer to the same base file name (eg, 'uxtheme') and have the right file linked for every platform, automatically.

In my understanding this is what we already do. Looking at VirtaulTrees.pas:

{$HPPEMIT '#pragma comment(lib, "uxtheme")'}

@joachimmarder joachimmarder self-assigned this Mar 3, 2025
@joachimmarder joachimmarder added the Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues! label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repro Steps Missing A smple project is needed to reprodcue and analyze the issue. See our guidelines for opening issues!
Projects
None yet
Development

No branches or pull requests

2 participants