Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Only an issue if you distribute binaries, and even then you can probably just use C bindings IIRC.
-
@Fast-Nop yeah, I'm coming to learn why things like libcurl and boost don't have binaries available. I started my visual studio project off like I do with C# and added the app logic to one project and the unrelated (& potentially reusable) logic to other projects, such as state machine and HTTP client. But come to find out that DLLs don't play nicely in c++ land, I just went the easier route and put everything in back in one project.
-
@AlgoRythm libcurl is obviously a c library, but the point still stands that unless you use a package manager you do indeed download a bundle of source code.
-
@iSwimInTheC C# actually compiles at runtime. To machine code, at least; and only on the first run.
-
Binary compatibility isn't guaranteed because forcing something like this on distributions is silly, but GCC makes a point of ensuring binary compat between minor version updates of the compiler.
-
There are also 3rd party standard library implementations that improve compat by ensuring that eg. everything that uses them explicitly shares an allocator.
Something they don't tell you about c++ development until it's too late: cross-compiler compatibility is an enormous monster.
When I worked with C# creating a DLL and distributing it to others is a completely transparent process, there's no special considerations required at all.
In c++ you basically aren't allowed to use the standard library in many cases. You can't just export a class with a standard string as a member because when another person goes to use your DLL, the string might have a different implementation.
rant