Open deviator opened 9 years ago
add
"dflags": ["-defaultlib=libphobos2.so"],
to dub.json.
Annoyingly enough, it will go on to complain that pyd modules are already defined in pydtest (as well as func, but that can be fixed by moving it out of src).
What would need to happen, is dub would need to not compile pyd modules in, but rather reference them in the so file. I'll see if I can figure something out...
hm.
"Dynamic libraries are not yet supported as dependencies - building as static library."
dub's out.
Next, the so file is missing some symbols because of some assumptions that don't hold in this case. those can be rearranged... and nope. pyd was not architected to work this way, so no quick hacky fixes today, sorry.
I'm thinking pyd's runtime needs to be built as a dynamic library. then both the pyd extension[s] and the main program would link to that. Not sure if that will work with all the template metaprogramming. It'd be an adventure.
Some workaround can be used: d program compiles with ldc2, compilation of python part wasn't change (i don't know how select ldc2 as d compiler in building process of pyd).
I call extending D function from embeded python code in D code
src/main.d
pct.py
src/func.d
setup_func.py
dub.json
run
and have error
Linux 4.0.4-201.fc21.x86_64 DMD64 v2.067.1 Python 3.4.1