[Libwebsockets] 回复: Static Link issue

Andy Green andy at warmcat.com
Sun Mar 29 06:48:59 CEST 2015



On 29 March 2015 12:29:19 GMT+08:00, Jeffrey Zhao <chunyong.zhao at qq.com> wrote:
>Dear Andy
>For some reasons, we need to use static link.

Have you tried explicitly giving it the libwebsockets.a file instead of -l?

>Could you tell me more details regarding clang list?

Google found this

http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users

I have no idea if your question is inappropriate there.

-Andy

>
>
>
>Thanks.
>
>
>
>
>
>
>------------------ 原始邮件 ------------------
>发件人: "Andy Green";<andy at warmcat.com>;
>发送时间: 2015年3月28日(星期六) 上午6:58
>收件人: "Jeffrey Zhao"<chunyong.zhao at qq.com>;
>"libwebsockets at ml.libwebsockets."<libwebsockets at ml.libwebsockets.org>; 
>
>主题: Re: [Libwebsockets] Static Link issue
>
>
>
>
>
>On 27 March 2015 21:22:50 GMT+08:00, Jeffrey Zhao
><chunyong.zhao at qq.com> wrote:
>>Dear Sir
>>When I do the static link with libwebsockets, it indicates that crt0.o
>>is not found.
>>Any suggestion here?
>
>It's not a question about lws.  crt0 is C Runtime Library.  Maybe try a
>clang list.
>
>Or, don't static link...
>
>-Andy
>
>>
>>thank you in advance.
>>
>>
>>
>>
>>
>>
>>gcc -lpthread -Wall -o2 test-server.c -o test-server -static
>>-lwebsockets
>>-L/Users/blue/Downloads/libwebsockets‍/libwebsockets/build/lib/
>>ld: library not found for -lcrt0.o
>>clang: error: linker command failed with exit code 1 (use -v to see
>>invocation)
>>make: *** [cti-server] Error 1‍
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Libwebsockets mailing list
>>Libwebsockets at ml.libwebsockets.org
>>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list