Skip to content

On the Windows 10 platform, the static library compiled with cmake is incorrectly linked #16

@iamtangxin

Description

@iamtangxin

Windows平台
Visual Studio 15 2017
使用cmake编译出的静态库 : hv_static.lib
在尝试编译libhv_echo例子的时候报链接错误:

1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hloop_new,该符号在函数 _main 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hloop_free,该符号在函数 _main 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hloop_run,该符号在函数 _main 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hio_setcb_read,该符号在函数 "void __cdecl on_accept(struct hio_s *)" (?on_accept@@YAXPAUhio_s@@@z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hio_setcb_close,该符号在函数 "void __cdecl on_accept(struct hio_s *)" (?on_accept@@YAXPAUhio_s@@@z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hio_read,该符号在函数 "void __cdecl on_accept(struct hio_s *)" (?on_accept@@YAXPAUhio_s@@@z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hio_write,该符号在函数 "void __cdecl on_recv(struct hio_s *,void *,int)" (?on_recv@@YAXPAUhio_s@@paxh@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 __imp__hloop_create_tcp_server,该符号在函数 _main 中被引用

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions