You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by 李梦翔 <xi...@qq.com> on 2016/11/10 07:53:59 UTC

回复: How to link the thirdparty library such as .a file into myproject?

Great job! I have merged it to my project. Thanks!  




------------------ 原始邮件 ------------------
发件人: "marko kiiskila";<ma...@runtime.io>;
发送时间: 2016年11月10日(星期四) 上午9:44
收件人: "李梦翔"<xi...@qq.com>; 
抄送: "dev"<de...@mynewt.incubator.apache.org>; 
主题: Re: How to link the thirdparty library such as .a file into myproject?



Hi,

I added support for this. If you place .a file in a source directory, it gets
included. Let me know if you encounter any errors.


—8<—cut start—

Repository: incubator-mynewt-newt
Updated Branches:
 refs/heads/develop f9159f5d8 -> 93cf30fbe


MYNEWT-476; if package source has .a's, include them when linking.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo>
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/93cf30fb>
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/93cf30fb>
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/93cf30fb>

Branch: refs/heads/develop
Commit: 93cf30fbe0b908de14f7bf630348da7efd0602d6
Parents: f9159f5
Author: Marko Kiiskila <marko@runtime.io <ma...@runtime.io>>
Authored: Wed Nov 9 17:10:18 2016 -0800
Committer: Marko Kiiskila <marko@runtime.io <ma...@runtime.io>>
Committed: Wed Nov 9 17:10:18 2016 -0800

----------------------------------------------------------------------
newt/builder/build.go      | 23 ++++++++++++-----
newt/toolchain/compiler.go | 57 +++++++++++++++++++++++++++++++++++++----
newt/toolchain/deps.go     | 27 +++++++++++++++++++
3 files changed, 95 insertions(+), 12 deletions(-)
———————————————————————————————————

> On Nov 8, 2016, at 5:59 PM, 李梦翔 <xi...@qq.com> wrote:
> 
> Tanks for your reply.
> 
> ---原始邮件---
> 发件人: "marko kiiskila"<ma...@runtime.io>
> 发送时间: 2016年11月9日 00:49:14
> 收件人: "dev"<de...@mynewt.incubator.apache.org>;
> 主题: Re: How to link the thirdparty library such as .a file into myproject?
> 
> Hi,
> 
> when in doubt, you can take a look at output of newt -lDEBUG build <your_target> 
> That’ll show the command line during linking.
> 
> I admit, that looks promising. When I tried that one out, those flags were not
> passed to linker, however. So it’s quite possible that pkg.lflags are not honored.
> 
> Also, we need more native support on newt for this, as having to use absolute
> path in that line pointing to .a is not good.
> 
> > On Nov 7, 2016, at 5:26 PM, 李梦翔 <xi...@qq.com> wrote:
> > 
> > I have to add this line to my pkg.xml:
> > pkg.lflags: /workspace/hw/mcu/synochip/as568/src/as568_romfunc.a /workspace/hw/mcu/synochip/as568/src/as568_crypto.a
> > 
> > 
> > Seems that works for me, but i'm not sure is that really OK?
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > xiangstudio@qq.com