Creating a dynamic library

Tony tonytdominguez at aol.com
Sat Sep 30 01:27:25 UTC 2017


On Saturday, 30 September 2017 at 01:02:08 UTC, Elronnd wrote:
> dmd bla.d bla2.d -shared -fPIC -oflibbla.so

Thanks. I don't normally compile right into a .so, but I think 
this is OK:

dmd my_file.o my_other_file.o  -shared   -of=libutest.so


One thing I picked up from SCons is creating dynamic object files 
with a .os extension and static object files with the standard .o 
extension. That way they can be compiled in the same directory in 
the same build step. But dmd rejects the files that are named 
*.os. Is there an extension besides .o that dmd would accept for 
the dynamic object files?




More information about the Digitalmars-d-learn mailing list