Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all functions exported in the Windows DLL #714

Closed
miltus opened this issue Jan 26, 2024 · 0 comments · Fixed by #715
Closed

Not all functions exported in the Windows DLL #714

miltus opened this issue Jan 26, 2024 · 0 comments · Fixed by #715
Labels
defect Suspected defect such as a bug or regression

Comments

@miltus
Copy link

miltus commented Jan 26, 2024

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.

@miltus miltus added the defect Suspected defect such as a bug or regression label Jan 26, 2024
kozlovic added a commit that referenced this issue Jan 27, 2024
This is important for Windows platform.

I also fixed a cast issue in util.c (that was reported on Windows build).
Some changes are also related to spaces at end of lines that were removed
by my editor.

Resolves #714

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@levb levb closed this as completed in #715 Jan 29, 2024
levb pushed a commit that referenced this issue Jan 29, 2024
This is important for Windows platform.

I also fixed a cast issue in util.c (that was reported on Windows build).
Some changes are also related to spaces at end of lines that were removed
by my editor.

Resolves #714

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant