Just starting with D (linking with C++)
codephantom
me at noyb.com
Sat Oct 28 02:20:42 UTC 2017
On Friday, 27 October 2017 at 17:14:20 UTC, sivakon wrote:
> I want to use C++ libraries for machine learning and deep
> learning. How do I add C++ libraries to my d code.
on FreeBSD, I use:
for C static binding:
----------------------
clang -c sample.c
dmd -L-lc foo.d sample.o
or
ldc -L-lc foo.d sample.o
for c++ static binding:
-----------------------
clang++ -c sample.cpp
dmd -L-lc++ foo.d sample.o
or
ldc -L-lc++ foo.d sample.o
There is nice article here that was pretty interesting too:
https://www.gamedev.net/blogs/entry/2254003-binding-d-to-c/
More information about the Digitalmars-d-learn
mailing list