Rebuilding the UI library (workaround)

The libui library that andlabs UI is built upon is packaged with the main library, but sometimes this gets out of date or is not compiled for the exact configuration of your computer. If you see an error when this happens, such as relocation R_X86_64_32S against '.rodata' can not be used when making a shared object, these instructions will help. If you see no error when installing, please skip these tips!

The following commands will rebuild the libui file for your computer. It assumes a Linux bash shell, as this situation is most likely to occur on a Linux computer. This is not going to be needed for anyone using the applications you build—just for setting up your development environment. The libui project is downloaded from Github and built using standard cmake tools. Be sure to specify the -DBUILD_SHARED_LIBS=OFF parameter, as we must build a static library to embed in the Go library:

Rebuilding libui if the packaged version doesn't work

The commands are designed to work without any environment configuration, but you will need cmake installed—your system's package manager will be able to install it if you find it isn't installed. Once the build is complete, the resulting library, out/libui.a, should be moved into the UI project and renamed appropriately.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.247.68