Category : abi

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

I see articles stating that it isn’t safe to pass STLs and shared_ptr between dlls because that can lead to memory corruption and They could have different C++ runtime implementations and therefore cause undefined behaviour. Question 1: Is this true if I compile both libraries with the same compiler version and flags? Considering that the ..

Read more

I am pretty new to C++ and am using gcc 7.5.0 compiler. I want to use the following Parallel Max Clique (PMC) library in my code. So I downloaded the whole and repo and added the folder to my current working directory (where my main.cpp i.e. the program in which I want to include the ..

Read more

Consider the following circumstances. First, I know that in the following situations the executables are certainly different: C/C++ code, different CPU instruction set architecture: the machine code will be completely different. C/C++ code, same CPU architecture, different OS: the format of the executables can be different – PE/ELF/Mach-O. Even with the same executable format, different ..

Read more