January 23 Re: Where I download Digital Mars C Preprocessor sppn.exe? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alain De Vos | On Mon, Jan 23, 2023 at 08:06:28PM +0000, Alain De Vos via Digitalmars-d-learn wrote: > Mixing D with C or C++ or Python is looking for problems. > Better write something in D. > And write something in C/C++/Python. > And have some form of communication between both. I don't know about Python, but I regularly write D code that interacts with external C libraries and have not encountered any major problems. You just have to put `extern(C)` in the right places and make sure you link the right objects / libraries, and you're good to go. So far I haven't actually tried integrating non-trivial C++ libraries with D yet, but I expect it will be similar unless you're dealing with C++ templates (which are not compatible with D templates) or multiple inheritance, which D doesn't support. T -- Right now I'm having amnesia and deja vu at the same time. I think I've forgotten this before. |
Copyright © 1999-2021 by the D Language Foundation