Coder Social home page Coder Social logo

Export C++ symbols about muparser HOT 10 CLOSED

beltoforion avatar beltoforion commented on July 21, 2024
Export C++ symbols

from muparser.

Comments (10)

giraldeau avatar giraldeau commented on July 21, 2024

Beware: the __cdecl should not be defined on classes.

from muparser.

beltoforion avatar beltoforion commented on July 21, 2024

Sorry i totally missed this part of the discussion. C++ exports cannot safely work with an API having STL dependencies. For this reason i do not want them.

from muparser.

jschueller avatar jschueller commented on July 21, 2024

This could be disabled by default (only export the C API), with a warning mentionning the compiler and stl runtime compatibility if enabled what do you think?
I think there are plenty libraries out there that use the stl without getting their tracker flooded with bug reports about abi compatibility, as his responsibility fals back to distro maintainers etc. Muparser can also be entirely included in a project's source code so it doesn't apply there either.
Another point is that its not fair to Windows developers wanting to use the c++ api as allowed on Linux.

from muparser.

beltoforion avatar beltoforion commented on July 21, 2024

On Windows there are no package maintainers. It is much more common to drop a dll into the program folder and expect it to work. There are plenty of visual studio versions in productive use. People will expect a DLL to work because it is just a DLL like so many others they used in the past. After all why should one have to recompile a shared library just because the compiler was upgraded? What good is a shared lib that cannot be shared by applications build with different versions of the compiler? Such a library would be combining the disadvantages of a static library with the disadvantages of a dynamic library.

The recommended way to use muparser on windows is as a static library or by including the source code. The overwhelming majority of windows programmers is using the exact same API as their colleges working with Linux. This is open source I'm not preventing anyone from building, using or providing a DLL with STL interface. I just happen to think that this is not a good idea and i don't want to have anything to do with it.

The interface of the muparser.dll has always been a C-interface. The goal was interoperability not having a shared library for the sake of having a shared library. It was aimed at people writing C#, C or Fortran code.

from muparser.

Ulysses1337 avatar Ulysses1337 commented on July 21, 2024

With the advent of vcpkg, I ask you to reconsider.

https://github.com/Microsoft/vcpkg/tree/master/ports/muparser

from muparser.

beltoforion avatar beltoforion commented on July 21, 2024

I don't really see how vcpkg is changing anything but if i get a tested modification that implements this without breaking stuff and without changing the meaning of existing macros i will merge it.

from muparser.

jschueller avatar jschueller commented on July 21, 2024

My PR was working, if you want it tested you can enable continuous integration using Travis/Appveyor services for this repository (see #36), the configuration files are already here. I can resubmit #43 without renaming the macros if that's a concern.

from muparser.

beltoforion avatar beltoforion commented on July 21, 2024

Ok, please resubmit without renaming the macros.

from muparser.

jschueller avatar jschueller commented on July 21, 2024

Ok @beltoforion see #49

from muparser.

beltoforion avatar beltoforion commented on July 21, 2024

Ok, merged. Thanks

from muparser.

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.