0
votes

I want to know, can I compile wxWidgets application on one Linux computer and gotten binary file running on another Linux computer, where didn't install wxWidgets? If it is possible, how can I do it? On both machines Ubuntu 18.04, and wxWidgets version is 3.1.2 Thank you.

1
I don't know about wxWidgets, but generally speaking you can, if you link all dependencies into the executable, and if both Linuxes use the same bittiness (32 vs 64). Try search terms like "static linking". - Robert
@GorMkrtchyan, I believe I answered you questin on the ML. ;-) - Igor
If both OS' have the same structure such as 64 or 32 bit and you compiled with the toolchain (clang, gcc...) and you are going to compile with the same toolchain again, then I think it should work. I did it on Windows 10 for VS and had no problems at all. - macroland
@macroland, Windows is completely different from *nix world. In *nix, people usually use the set of libraries from the official distro repository, while on Windows everyuthing needs to be compiled by hand and searched for. - Igor

1 Answers

0
votes

What you are looking for is static link (instead of dynamic linking). By using static linking, you can package the WxWidget libraries that you need into your executable. The user (or target computer) won't need to install them on their end.

Here are a couple of links that should help you configure your WxWidgets build for static (in particular, it is the --disable-shared config flag).

https://www.binarytides.com/install-wxwidgets-ubuntu/ https://wiki.wxwidgets.org/Compiling_and_getting_started

If you are new to programming in general, it's worth spending some time getting a good handle on the different compiler methods and resulting binaries (static and dynamic libraries, executables, etc.).