Using rdmd to create shared object files
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 2 12:04:12 PDT 2015
Hello,
I am trying to use rdmd to create shared object files.
The command that I am using is
"rdmd --build-only -shared -fPIC -defaultlib= foo.d"
This creates a file called "foo" - wich is not exactly what I
expectd.
However
"dmd -shared -fPIC -defaultlib= foo.d "
creates a file called "foo.so" - that is what i expect and need.
The command ill be actually using will be similar to this:
"find ../script -name *.d -exec dmd -I../../deps/ -I../../source/
-fPIC -shared -debug -g -defaultlib= {} \;"
The amount of files that will be compiled by this are really
likely going to increase over time, so using rdmd here would be
nice in terms of compile time.
The issues i have is that rdmd dosnt create .so files but (at
least on my linux) creates them without a file exenstion. I could
rename them with -of but that would increase this ugly
find-command even more. The second thing (wich isnt such a big
issue): I have to use "--build-only" for rdmd because it will try
to run the newly created shared object.
Also, not so on-topic to be asked here: Is there a nicer solution
for the "all .d files in this directory and the ones below"?
I remeber its possible to do something like
"dmd ./**/*.d"
but I cant get that to work...
Thanks
Malte
More information about the Digitalmars-d-learn
mailing list