Skip to content

cmake fails to build with -DZSTD_PROGRAMS_LINK_SHARED=ON on windows  #3554

@anarazel

Description

@anarazel

Hi,

building with -DZSTD_PROGRAMS_LINK_SHARED=ON results in:

fileio_asyncio.c.obj : error LNK2019: unresolved external symbol POOL_create referenced in function AIO_IOPool_createThreadPool
fileio_asyncio.c.obj : error LNK2019: unresolved external symbol POOL_free referenced in function AIO_IOPool_destroy
fileio_asyncio.c.obj : error LNK2019: unresolved external symbol POOL_joinJobs referenced in function AIO_IOPool_join
fileio_asyncio.c.obj : error LNK2019: unresolved external symbol POOL_add referenced in function AIO_IOPool_enqueueJob
programs\zstd.exe : fatal error LNK1120: 4 unresolved externals

The reason is fairly simple: The API in pool.h isn't made visible, therefore the references from programs/fileio.c can't see them.

Before 1598e6c a build like this worked. CC: @yoniko

It looks like it'd be easy enough to fix for POOL_create, POOL_free, there are public wrappers. But for the rest there isn't an obvious answer.

Regards,

Andres

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions