3 ms·
The way I see it: 1) Go produces 100% portable code. I absolutely suffered doing the same for a very basic C++ program that used C++11's std::regex. Compiled f
by Cyph0n 11y ago
The way I see it:
1) Go produces 100% portable code. I absolutely suffered doing the same for a very basic C++ program that used C++11's std::regex. Compiled fine on clang-3.5 on OS X, fails on clang on Linux. It took me hours of searching online to find and install the exact version of GCC that actually fills in std::regex instead of just keeping it empty. Trust me, there are some versions that do that! No errors during compilation, but still doesn't run.
2) Statically compiled binaries. I can be confident that the absence of some essential library from the user's end won't break my app.
3) Cross-platform, especially with something like Qt. Write once, compile for each OS, then run - done!
- deleted 11y ago[deleted]
- tosseraccount 11y agoGo programs can link the Qt library, specifically the GUI components, statically? ... it produces one output binary per target OS?
- Cyph0n 11y agoI have not tried Qt with Go to be honest, but in general yes compiled Go code produces a single statically linked binary on the target OS.
- deleted 11y ago[deleted]
- noselasd 11y agoYou can't currently link to Qt statically though. (And holy smokes, that would be a huge binary if it did, just libQt5Widgets.so links to 49 other libraries, everyting from X11 libs to libbz2 to opengl)
- rhodysurf 11y agoNo it cannot unless you pay for commercial. This is because of Qt licensing last I knew. So ta not totally static but no worse than C++