Thread overview |
---|
December 27, 2015 How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Hi, Now I need get the .a file on Linux,target system is ARM. If you use gcc ,you will use the 'ar' to get .a file, but how to do by GDC ? And how to get the execute file by .a file and .d file? Thank you. |
December 27, 2015 Re: How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
> Hi,
> Now I need get the .a file on Linux,target system is ARM.
> If you use gcc ,you will use the 'ar' to get .a file,
> but how to do by GDC ?
> And how to get the execute file by .a file and .d file?
>
> Thank you.
I couldn't have understood your question very well, but some information is here.
You create .a static library file with "-lib" flag while compiling. Yesterday I did it.
dmd mylib.d -lib
This will generate mylib.a.
You can later use this static library while compiling another d code.
dmd main.d mylib.a
Pass the .a file directly as it is another source.
I have never tried these with GDC, but I don't think it is much different at all.
|
December 27, 2015 Re: How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to tcak | On Sunday, 27 December 2015 at 15:24:17 UTC, tcak wrote:
> On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
>> Hi,
>> Now I need get the .a file on Linux,target system is ARM.
>> If you use gcc ,you will use the 'ar' to get .a file,
>> but how to do by GDC ?
>> And how to get the execute file by .a file and .d file?
>>
>> Thank you.
>
> I couldn't have understood your question very well, but some information is here.
>
> You create .a static library file with "-lib" flag while compiling. Yesterday I did it.
>
> dmd mylib.d -lib
>
> This will generate mylib.a.
>
> You can later use this static library while compiling another d code.
>
> dmd main.d mylib.a
>
> Pass the .a file directly as it is another source.
>
> I have never tried these with GDC, but I don't think it is much different at all.
Now I will target file to ARM linux,and dmd can't get the file for ARM.
|
December 27, 2015 Re: How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
> Hi,
> Now I need get the .a file on Linux,target system is ARM.
> If you use gcc ,you will use the 'ar' to get .a file,
> but how to do by GDC ?
> And how to get the execute file by .a file and .d file?
>
> Thank you.
Just use ar on the generated object files the same way you would if you were using gcc.
|
December 28, 2015 Re: How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Sunday, 27 December 2015 at 17:19:26 UTC, Mike Parker wrote:
> On Sunday, 27 December 2015 at 15:19:21 UTC, FrankLike wrote:
>> Hi,
>> Now I need get the .a file on Linux,target system is ARM.
>> If you use gcc ,you will use the 'ar' to get .a file,
>> but how to do by GDC ?
>> And how to get the execute file by .a file and .d file?
>>
>> Thank you.
>
> Just use ar on the generated object files the same way you would if you were using gcc.
Thank you,but the error is not ok.maybe some PATH is error,I don't how to set.
|
December 28, 2015 Re: How to use GDC to get .a file on Linux? | ||||
---|---|---|---|---|
| ||||
Posted in reply to FrankLike | Answer is here: http://forum.dlang.org/thread/txvntyahlaewutzzwggo@forum.dlang.org |
Copyright © 1999-2021 by the D Language Foundation