Using PyD

2017-11-21 Thread sivakon via Digitalmars-d-learn
I can create a python project by creating a PyDobject and `python setup.py install` and get the output. If I want to add an external library in D (usually I do that with `dub run --single` command), how do I accomplish that? In the project below, if I want to use some D libraries, how do I b

Re: Just starting with D (linking with C++)

2017-10-28 Thread sivakon via Digitalmars-d-learn
On Saturday, 28 October 2017 at 02:20:42 UTC, codephantom wrote: 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: ---

Re: Just starting with D (linking with C++)

2017-10-27 Thread sivakon via Digitalmars-d-learn
On Friday, 27 October 2017 at 17:21:39 UTC, Joakim wrote: This should work: dmd foo.d Sample.o Just like the C examples from the D blog: https://dlang.org/blog/2017/10/25/dmd-windows-and-c/ Just used this! Got this error! sample.o: In function `foo(int, int, int)': sample.cpp:(.text+0x17):

Just starting with D (linking with C++)

2017-10-27 Thread sivakon via Digitalmars-d-learn
Hi, Just started to work with D. Great language. I want to use C++ libraries for machine learning and deep learning. How do I add C++ libraries to my d code. For example, //sample.cpp #include using namespace std; int foo(int i, int j, int k) { cout << "i = " << i << endl; cout <<