Skip to content

Tip: Compile Dynamically with Mingw64/MSYS2 on Windows and a Question #36

@cyberpunkbln

Description

@cyberpunkbln

Hello,

i have a simple fix for my problem. Compile onces with a failure and then go your cargo-folder .\cargo and search for the ui-sys-0.1.3 got libui and there to windows and edit the CMakeLists.txt at the end is an:


if(NOT MSVC)
	if(BUILD_SHARED_LIBS)
		message(FATAL_ERROR
			"Sorry, but libui for Windows can currently only be built as a static library with MinGW. You will need to either build as a static library or switch to MSVC."
		)
	endif()
endif()

Delete this lines completly and make an cargo clean and try to rebuild and magic its rebuild and you can find your libui.dll in your target directory (search for libui.dll).

Now after this i have a 2 short questions. What happends when i change my rust-toolchain to an win33 (i686) build, regonize this the cmakefiles in the libui-distrubution and build automaticly an 32bit libui.dll?

And what must i do to rename and copy automaticlly the libui.dll to libui_64.dll and copy it to the target-root?

thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-enhancementNew feature or requestc-questionFurther information is requestedp-mediumMedium Priority

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions