Category : abi

Can’t call a class method using libffi library working with function calling convention. On x86, it turned out to write code using _asm rates, transferring that code to x64 no longer works since there is a different system for passing parameters to a function. There is a description in the article https://docs.microsoft.com/ru-ru/cpp/build/x64-calling-convention?view=msvc-160. I want to ..

Read more

The common explanation for not fixing some issues with C++ is that it would break the ABI and require recompilation, but on the other hand I encounter statements like this: Honestly, this is true for pretty much all C++ non-POD types, not just exceptions. It is possible to use C++ objects across library boundaries but ..

Read more

For a personal project, a raspberry pi-controlled guitar pedal, i’m creating a small library. This library contains a bunch of classes specifying the the function of several types of effects. For this I have an Effect base-class that every effect inherits from, together with an EffectFactory base-class that will create sequences of effects based on ..

Read more

I am creating a client server architecture where I use c++ as my backend and QML/c++ as my frontend.. I share commomn c++ structures in a common library that make up the data that is passed between the client and server through it’s API. So now if I have a structure like this in the ..

Read more

I think it’s impossible or very dangerous to send pointer / reference to dynamic loaded library from another compiler or ever another languages like C#. And I want to find proofs, but C++ standard documentation is pretty huge. I think null terminated string will work fine, but how about std::string, or maybe string_view? Source: Windows ..

Read more

I have the following interface class: class __attribute__((visibility("default"))) Base { public: Base() = default; virtual rtype method1() = 0; virtual rtype method2() = 0; ··· virtual rtype methodN() = 0; } And the following child class: class __attribute__((visibility("default"))) Child { public: Child() = default; virtual ~Child() = default; virtual rtype method1() { ··· } virtual ..

Read more

For some reasons I need to link an executable (in Linux) which has object files compiled by different C++ compilers and versions. I use g++ and clang (9, 10 and some older ones). May occur any compatibility issues in this scenario? Thanks Source: Windows Que..

Read more