Skip to content

not linking #67

@DrAlta

Description

@DrAlta

I tried doing the example and got this error when trying to run it.

I follow the recomendation for windows and the linked instruction for rust SDL with I can get its examples to work for me.
error: linking with link.exefailed: exit code: 1120 | = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\Users\\dralt\\AppData\\Local\\Temp\\rustcVm0SO6\\symbols.o" "<144 object files omitted>" "C:\\ROOT\\keep\\Gits\\embed-test\\target\\debug\\deps/{libembedded_graphics_simulator-195b849fe0501c33.rlib,libouroboros-3d7d24247277697f.rlib,libstatic_assertions-dc86ef657059a9cd.rlib,libaliasable-0d1372df8147ba71.rlib,libsdl2-3356494322940279.rlib,libsdl2_sys-59bc82621c8537b6.rlib,liblazy_static-aa264dec8e156b7d.rlib,liblibc-434f7b0ddc641583.rlib,libimage-ff5846b45454a2bd.rlib,libbytemuck-a9e60e20e1331d09.rlib,libbyteorder_lite-8274c429b840b68d.rlib,libpng-49847eed5d71843a.rlib,libbitflags-dfca5c4ffa4f1d59.rlib,libflate2-1723685d6eba0b29.rlib,libminiz_oxide-ec80e1098daf155b.rlib,libfdeflate-a89563a78ad4b728.rlib,libsimd_adler32-ded2f8c0fd9d7727.rlib,libcrc32fast-d5a70d0f370257ec.rlib,libcfg_if-eb6d6f4d21e6b1af.rlib,libbase64-c9cc1af3ab183922.rlib,libembedded_graphics-edd8971377fbbc6f.rlib,libbyteorder-b682bdd799218981.rlib,libfloat_cmp-db10cf4f4d59d1ab.rlib,libnum_traits-b9007e28f9cae6fb.rlib,libmicromath-b22b4663fc88f5e6.rlib,libembedded_graphics_core-5f18a6d377bbcda0.rlib,libaz-acd97a3ec61bfa5c.rlib}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/{libstd-*,libpanic_unwind-*,libwindows_targets-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libunwind-*,libcfg_if-*,liballoc-*,librustc_std_workspace_core-*,libcore-*,libcompiler_builtins-*}.rlib" "SDL2.lib" "legacy_stdio_detions.lib"tions.lib"tions.lib"tions.lib" "kernel32.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:msvcrt" "/NXCOMPAT" "/OUT:C:\\ROOT\\keep\\Gits\\embed-test\\target\\debug\\deps\\embed_test.exe" "/OPT:REF,NOICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:<sysroot>\\lib\\rustlib\\etc\\libstd.natvis" = note: some arguments are omitted. use--verbose` to show all linker arguments
= note: libsdl2-3356494322940279.rlib(sdl2-3356494322940279.sdl2.7a8c4756a9284a4f-cgu.6.rcgu.o) : error LNK2019: unresolved external symbol SDL_SetPrimarySelectionText referenced in function _ZN4sdl29clipboard13ClipboardUtil26set_primary_selection_text17hca263f14cffb83b1E␍
libsdl2-3356494322940279.rlib(sdl2-3356494322940279.sdl2.7a8c4756a9284a4f-cgu.6.rcgu.o) : error LNK2019: unresolved external symbol SDL_GetPrimarySelectionText referenced in function _ZN4sdl29clipboard13ClipboardUtil22primary_selection_text17ha65319509f39778fE␍
libsdl2-3356494322940279.rlib(sdl2-3356494322940279.sdl2.7a8c4756a9284a4f-cgu.6.rcgu.o) : error LNK2019: unresolved external symbol SDL_HasPrimarySelectionText referenced in function _ZN4sdl29clipboard13ClipboardUtil26has_primary_selection_text17heb8d5a594d47f5f4E␍
C:\ROOT\keep\Gits\embed-test\target\debug\deps\embed_test.exe : fatal error LNK1120: 3 unresolved externals␍

error: could not compile embed-test (bin "embed-test") due to 1 previous error`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions