Re: Creating a dynamic library

2017-09-30 Thread Tony via Digitalmars-d-learn
On Saturday, 30 September 2017 at 10:09:43 UTC, Mike Wey wrote: On 30-09-17 03:27, Tony wrote: 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 t

Re: Creating a dynamic library

2017-09-30 Thread Mike Wey via Digitalmars-d-learn
On 30-09-17 03:27, Tony wrote: 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

Re: Creating a dynamic library

2017-09-29 Thread Tony via Digitalmars-d-learn
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 dynami

Re: Creating a dynamic library

2017-09-29 Thread Elronnd via Digitalmars-d-learn
dmd bla.d bla2.d -shared -fPIC -oflibbla.so

Creating a dynamic library

2017-09-29 Thread Tony via Digitalmars-d-learn
I would like to know that command line (I am on Linux) I would use to compile a D file and create an object file that is suitable for a Linux dynamic library (.so). I believe it is probably dmd -c -fPIC my_file.d Also, what is the command line to create a dynamic library from one or more obj