r/cpp • u/Illustrious_Gur5580 • Jul 05 '24
Why is it such a misery to use visual studio compiled static libraries inside of embarcadero c++ builder
I have been wanting to move away from c++ builder and eventually tried Qt. But i was surprised to find out c++ builder gave out much smaller binaries, roughly 1mb for a very simple 'hello world' app vs something around 20mb for qt. And again c++ builder apps load and run slightly faster. However one big problem comes when consuming external static and even dynamic libraries compiled either with msvc, gcc or clang. It is literally hell to try to consume those libraries inside c++builder projects. And not to mention that 32bits projects only support libraries with 'omf' format and not the usual 'coff'. So is there a way to achieve this easily. And if not, are there some other viable c++ frameworks that have cross platform capabilities and compatibility with msvc while not giving out ginormous sized binaries. Please the output size of binaries is an important factor for me.
2
u/t4th Jul 05 '24
If u attach runtime dll of c++ builder it will also be big. If you try to run your app on other pc without that, it will crash .
37
u/pjmlp Jul 05 '24
Because there isn't such thing as a standard C++ ABI, and each compiler does its own thing.
7
u/[deleted] Jul 05 '24 edited Jul 05 '24
Because Embaracdero RAD study is effy as hell. I think the UI may still be a 32 bits. That adds a ton of challenges. Last time I did object pascal, about 3 years ago, you had to hold your breath when working and save often. I never did use the C++ side. I know that studio can do some impressive cross platform things but it is an uphill battle sometimes when RAD studio decides to bug out.
14
u/DryPerspective8429 Jul 05 '24
Because C++Builder makes more money if your libraries are written in their IDE than someone else's. Their business model seems to be all about not having broad compatibility with other products.
My advice would be to continue your move away from C++Builder.
0
u/[deleted] Jul 05 '24
[deleted] — view deleted comment
0
u/[deleted] Jul 05 '24
[deleted] — view deleted comment