4 ms·
Are there any good tutorials for cross platform development with C++ on windows. I just want to avoid MSVC compilers and use clang or gcc. Also, C++ module/pa
by kumarvvr 9y ago
Are there any good tutorials for cross platform development with C++ on windows.
I just want to avoid MSVC compilers and use clang or gcc.
Also, C++ module/package/library management is very very confusing. You have to configure multiple files in multiple folders and multiple configuration entries.
I tried it almost a dozen times and just left it out of frustration.
Compared to development with python, it's just mind numbing.
- AlexeyBrin 9y agoYou can install Msys2 http://www.msys2.org/ http://www.msys2.org/ and use GCC 7. Your compiled code will be 100% native Windows executable and will run on other Windows machines.
- webaholic 9y agoYou can now use clang as an alternative compiler in Visual Studio. Other option is to install bash on windows and install gcc/clang and use that.
- jcelerier 9y ago> Are there any good tutorials for cross platform development with C++ on windows. Install QtCreator with MinGW. Here you can just compile your code and have it work. > You have to configure multiple files in multiple folders and multiple configuration entries. not on sane systems where you just do `apt-get install libsdl1.2-dev` or `pacman -S gtk` or `brew install qt boost`
- bigtunacan 9y agoI hear QtCreator mentioned on Hacker News quite frequently. A couple of questions, if you don't mind. 1) How well does it work if you are trying to stick to C and not go the C++ route? 2) They are GPL licensed, so not very permissive, or quite expensive for a commercial license. Is there a significant difference in feature set between the open source & commercial versions for someone that just wants to take it for a spin?
- severino 9y agoAbout your second question: as far as I know, you can use the LGPL Qt in commercial projects, freely, as long as you don't statically link the libs. https://stackoverflow.com/questions/11994053/can-i-use-qt-lgpl-license-and-sell-my-application-without-any-kind-of-restrictio https://stackoverflow.com/questions/11994053/can-i-use-qt-lg...
- jcelerier 9y ago> How well does it work if you are trying to stick to C and not go the C++ route? The IDE works fine, but you're missing on a lot :p. You can use raw makefiles or, better, CMake with it; the integration with cmake's server mode in the latest version is top notch. > They are GPL licensed, so not very permissive, or quite expensive for a commercial license. Is there a significant difference in feature set between the open source & commercial versions for someone that just wants to take it for a spin? First, there are two things: Qt and QtCreator. Qt is a C++ library (and also has its own DSL, QML which is a godsend to make modern UIs) and QtCreator is an IDE. While it has a lot of Qt-specific features (eg UI designer, some Qt-specific autocompletions, Qt examples on the front page), it can just be used as a general-purpose IDE for C, C++, Python, and Nim. As such, its license does not matter for you as a developer, unless you want to ship a product with the IDE (for instance Sailfish OS and Ubuntu used a customized QtCreator as the IDE for their respective SDK). Then, Qt is as you saw, under multiple licenses: commercial, gpl, and lgpl. * all the libraries are under GPL. * most modules are additionnally under LGPL. * two tools are only under the commercial license: QML compiler (but it has been superceded by another approach that was open-sourced) and pre-made images for some embedded boards (Boot2Qt, basically useful for embedded software that runs fullscreen just on top of the linux kernel with no GUI environment, generally on the raw framebuffers or drivers provided by the board vendor). The things that are under GPL but not LGPL are here: http://doc.qt.io/qt-5/qtmodules.html#gpl-licensed-addons http://doc.qt.io/qt-5/qtmodules.html#gpl-licensed-addons (three modules: virtual keyboard, charts and data visualization). Everything else on the page (ie more than enough for "taking it for a spin") can be used from proprietary apps (you have to make a readme at some point that says that you use Qt, like any other open source libs.) . The simplest is to just use the Qt shared libs, but you can also link them statically: https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynamic https://www.gnu.org/licenses/gpl-faq.html#LGPLStaticVsDynami...