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
Cannot link to built Vala shared library when using MSVC #8716
Comments
I think the issue here might be more general: Meson has no way to ensure that an import library is generated for a .dll. On Windows you have to declare your symbols to export from a library with
On Linux, GCC and Clang export library symbols by default and you link directly to the .so, so this isn't a problem. I'm actually seeing this issue with C on Windows too, so it's not just a Vala problem. It seems that CMake has a way to address this problem with the Some more useful links: |
So the problem here is either:
|
You can also provide a .def file with the symbols you want exported if you don't want to do the dllexport thing. |
Sure, but that would have to be auto-generated. |
Just saying that this doesn't look vala-specific at all, it's the same with C. |
Basically a duplicate of #2132 I think. |
@tp-m yes, you're probably right. Had I seen that before making this issue I might've decided to just mention there how this breaks Vala builds as well. |
This really feels like a valac |
Describe the bug
Linking with a Vala shared library fails when using MSVC on Windows. The problem I think is that the import library for the dll isn't generated. Positional arguments like
implib
orexport_dynamic
aren't supported with*library()
, but I think this should be done automatically.link
gives an error likecannot open input file lib\valalib.lib
To Reproduce
Just run test case
vala\7 shared library
on Windows usingcl
for C compiler andlink
for linker.Expected behavior
Linking with a Vala built shared library should work.
system parameters
cl.exe
msvc 19.29.30031 "Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30031 for x64"link.exe
14.29.30031.0The text was updated successfully, but these errors were encountered: