On Friday, 6 June 2014 at 02:17:50 UTC, George Sapkin wrote:
On Friday, 6 June 2014 at 02:13:08 UTC, Ellery Newcomer wrote:
On Thursday, 5 June 2014 at 18:51:25 UTC, George Sapkin wrote:
I'm trying to link a simple D static library to C code, but
I'm can't figure out how to do it properly witho
On Friday, 6 June 2014 at 02:13:08 UTC, Ellery Newcomer wrote:
On Thursday, 5 June 2014 at 18:51:25 UTC, George Sapkin wrote:
I'm trying to link a simple D static library to C code, but
I'm can't figure out how to do it properly without getting a
segfault when running it.
try this:
dmd -lib
On Thursday, 5 June 2014 at 18:51:25 UTC, George Sapkin wrote:
I'm trying to link a simple D static library to C code, but I'm
can't figure out how to do it properly without getting a
segfault when running it.
try this:
dmd -lib test.d -defaultlib=libphobos2.a -oflibtest.a
gcc main.c libtest.
On Friday, 6 June 2014 at 02:01:12 UTC, Mark Isaacson wrote:
I found that if I told dmd rather than gcc to do the linking
that
everything just magically worked.
In other words:
gcc -c cstuff.c
dmd -c dstuff.d
dmd cstuff.o dstuff.o
I presume that dmd would be similarly smart with static
librar
I found that if I told dmd rather than gcc to do the linking that
everything just magically worked.
In other words:
gcc -c cstuff.c
dmd -c dstuff.d
dmd cstuff.o dstuff.o
I presume that dmd would be similarly smart with static libraries.
On Thursday, 5 June 2014 at 19:14:34 UTC, Stefan Koch wrote:
On Thursday, 5 June 2014 at 19:00:24 UTC, George Sapkin wrote:
On Thursday, 5 June 2014 at 18:55:13 UTC, Stefan Koch wrote:
You need to link the druntime too, I think.
At which stage? Can you provide a full command? Thanks.
Err ..
On Thursday, 5 June 2014 at 19:14:34 UTC, Stefan Koch wrote:
On Thursday, 5 June 2014 at 19:00:24 UTC, George Sapkin wrote:
On Thursday, 5 June 2014 at 18:55:13 UTC, Stefan Koch wrote:
You need to link the druntime too, I think.
At which stage? Can you provide a full command? Thanks.
Err ..
On Thursday, 5 June 2014 at 19:10:17 UTC, Dave Wilson wrote:
You can create a static library from one or more .o files using
ar, if that helps (unless I've failed to understand the
question). "ar r libtest.a test.o" should do the job.
I don't have trouble creating a static library with dmd, I
On Thursday, 5 June 2014 at 19:00:24 UTC, George Sapkin wrote:
On Thursday, 5 June 2014 at 18:55:13 UTC, Stefan Koch wrote:
You need to link the druntime too, I think.
At which stage? Can you provide a full command? Thanks.
Err ... I just remeberd linking d with gcc needs a few libs
-lpthrea
You can create a static library from one or more .o files using
ar, if that helps (unless I've failed to understand the
question). "ar r libtest.a test.o" should do the job.
On Thursday, 5 June 2014 at 18:55:13 UTC, Stefan Koch wrote:
You need to link the druntime too, I think.
At which stage? Can you provide a full command? Thanks.
You need to link the druntime too, I think.
12 matches
Mail list logo