ocaml / flexdll

a dlopen-like API for Windows
Other
97 stars 30 forks source link

flexlink: simplify static linking with libstdc++ #121

Open kit-ty-kate opened 9 months ago

kit-ty-kate commented 9 months ago

Currently with flexlink, if you have a C++ binding and want to link it statically in your executable to avoid having to carry the dll around the only option that works is to manually set the name for the archive file like this (with MinGW):

-l:libstdc++.a -l:libpthread.a -Wl,-static

It would be nice if something like -lstdc++ -static was a thing so that flexlink can find the correct archive file as by default -lstdc++ -Wl,-static will use libstdc++.dll.a which is the shared version of libstdc++ and not the static one.