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

[Windows] Linking with pre-built dynamic library fails #80

Open
WeAthFoLD opened this issue Aug 11, 2020 · 0 comments
Open

[Windows] Linking with pre-built dynamic library fails #80

WeAthFoLD opened this issue Aug 11, 2020 · 0 comments

Comments

@WeAthFoLD
Copy link

WeAthFoLD commented Aug 11, 2020

When setting SHADERC_LIB_DIR to /path/to/shaderc/bin (implying that I want dynamic linkage), linker issues following error:

error: linking with `link.exe` failed: exit code: 1181                                                                  
  |
  = note: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "E:\Projects\testsc\target\debug\deps\testsc.21j59gef162pi5qu.rcgu.o" "E:\Projects\testsc\target\debug\deps\testsc.285crb9lg1fijir5.rcgu.o" "E:\Projects\testsc\target\debug\deps\testsc.2zf9ru0rpvf1kqbm.rcgu.o" "E:\Projects\testsc\target\debug\deps\testsc.3v2sq2q0w83icjjk.rcgu.o" "E:\Projects\testsc\target\debug\deps\testsc.5ev3mu7wd8chgvpi.rcgu.o" "E:\Projects\testsc\target\debug\deps\testsc.5gqn7i2z86y3kd4w.rcgu.o" "/OUT:E:\Projects\testsc\target\debug\deps\testsc.exe" "E:\Projects\testsc\target\debug\deps\testsc.2yqu992c926i7c10.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\intrinsic.natvis" "/NATVIS:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis" "/NATVIS:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis"
"/NATVIS:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libstd.natvis" "/LIBPATH:E:\Projects\testsc\target\debug\deps" "/LIBPATH:C:\ProgramData\shaderc\bin" "/LIBPATH:C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "E:\Projects\testsc\target\debug\deps\libshaderc-98dc482ba5d8e7e3.rlib" "E:\Projects\testsc\target\debug\deps\libshaderc_sys-f3fc139ef83e0397.rlib" "E:\Projects\testsc\target\debug\deps\liblibc-41107e176498dbd5.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd-d2cb2280bcd44383.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libpanic_unwind-140520697b0936d7.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libhashbrown-a3e1790633df522a.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_alloc-2f29aa3beddef483.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libbacktrace-963dd21d9104800a.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_demangle-ac2d16dbeba7d44c.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libunwind-bab8a0038eeffc7d.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcfg_if-0a2aca5d715fa450.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liblibc-04cd9a6d769db645.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liballoc-69018e88568c263f.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_core-f33a85683612f403.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcore-a5f276186a1cbe1e.rlib" "C:\Users\junchen.zhou\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcompiler_builtins-7c234882c060b305.rlib" "shaderc_shared.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: 无法打开输入文件“shaderc_shared.lib” (Can't open file shaderc_shared.lib)

But if I copy /path/to/shaderc/lib/shaderc_shared.lib to /path/to/shaderc/bin/shaderc_shared.lib, the linking process succeeds.

@WeAthFoLD WeAthFoLD changed the title [Windows] Can't link with pre [Windows] Linking with pre-built dynamic library Aug 11, 2020
@WeAthFoLD WeAthFoLD changed the title [Windows] Linking with pre-built dynamic library [Windows] Linking with pre-built dynamic library fails Aug 11, 2020
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

1 participant