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

Compile static library on windows #203

Closed
0xmemorygrinder opened this issue Jun 8, 2023 · 2 comments
Closed

Compile static library on windows #203

0xmemorygrinder opened this issue Jun 8, 2023 · 2 comments

Comments

@0xmemorygrinder
Copy link

Hello,

Since the symbols exports were removed in #184, I'm wondering how I can compile uSockets on windows and get aml the symbols when I link it to a shared library.

Since the macro is not applied anymore to all the functions, when compiling on windows (and macos btw), the symbols are not exported and the linking step of my shared library fails.

How can I solve that ?

Thanks in advance

@glingy
Copy link
Contributor

glingy commented Jun 17, 2023

As mentioned in the PR you linked, this should really not be used as a shared library. The performance as a shared library is far worse than as a static library with LTO enabled. It was decided in that PR that support for shared libraries was not worth cluttering the output of statically built executables with extra exported symbols.

@uNetworkingAB
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants