nats-io / nats.c

A C client for NATS
Apache License 2.0
390 stars 137 forks source link

Not all functions exported in the Windows DLL #714

Closed miltus closed 9 months ago

miltus commented 9 months ago

Observed behavior

The functions natsConnection_IsDraining and natsConnection_GetLocalIPAndPort are missing the NATS_EXTERN declaration, so these functions are not available when using the Windows DLL

Expected behavior

The functions natsConnection_IsDraining and natsConnection_GetLocalIPAndPort should be exported to the Windows DLL.

Server and client version

n/a, latest version of the nats.c repository

Host environment

building on Windows 10, using Visual Studio 2019 and CMake 3.25

Steps to reproduce

Checkout and build the nats.c library on Windows, e.g.

git clone https://github.com/nats-io/nats.c.git
cmake -S . -B build -DBUILD_SHARED_LIBS=ON -DNATS_BUILD_STREAMING=OFF
cmake --build build

Examine build\src\Debug\natsd.dll in a dependency viewer, e.g. https://github.com/lucasg/Dependencies. The functions natsConnection_IsDraining and natsConnection_GetLocalIPAndPort are not exported.