Giter VIP home page Giter VIP logo

Comments (6)

uNetworkingAB avatar uNetworkingAB commented on June 6, 2024 1

if you want to add that _DLL macro check under _WIN32 that's fine with me, that sounds very reasonable make PR plaes

from usockets.

z16166 avatar z16166 commented on June 6, 2024

Maybe we can use MSVC macro "_DLL" to detect dll build vs static lib build.

#ifdef _WIN32

#ifdef _DLL
#define WIN32_EXPORT __declspec(dllexport)
#else
#define WIN32_EXPORT
#endif

#endif

from usockets.

traversaro avatar traversaro commented on June 6, 2024

As the default build system only build static libraries (#99), the easiest fix for this issue is just to define WIN32_EXPORT to an empty string also on Windows. However, at that point WIN32_EXPORT would be empty on all platforms, so probably it could make sense to just remove it altogether. I would be happy to provide a PR to remove it if that is the decision of the mantainers of the library.

from usockets.

uNetworkingAB avatar uNetworkingAB commented on June 6, 2024

Now that I think of it, who is really building DLL of uSockets? That's really crappy for performance and should never be done. uSockets should always be a static lib

from usockets.

traversaro avatar traversaro commented on June 6, 2024

Now that I think of it, who is really building DLL of uSockets? That's really crappy for performance and should never be done. uSockets should always be a static lib

Indeed, that is what I mentioned in #184 (comment) . Do you prefer to simply define WIN32_EXPORT to empty also on Windows or just get rid of WIN32_EXPORT altogether?

from usockets.

traversaro avatar traversaro commented on June 6, 2024

Now that I think of it, who is really building DLL of uSockets? That's really crappy for performance and should never be done. uSockets should always be a static lib

Indeed, that is what I mentioned in #184 (comment) . Do you prefer to simply define WIN32_EXPORT to empty also on Windows or just get rid of WIN32_EXPORT altogether?

This was handled in b950efd, thanks!

from usockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.