>> Want to make a simple C++ program that I can distribute as a single exe file to non-techy colleagues so they can work with a simulation I wrote. >> Spend 17 hours building QT on my shitty laptop so I can statically link it because the installer only installs a dynamically linked version. >> Try linking it. >> It fails, visual studio gives me 147 errors from QT core. I might have messed up compile instructions for QT.
Why is the C++ ecosystem so hard to work with? No other language forces me to do 17 hour builds to make the simplest possible GUI app and bundle it into an executable. Even Haskell with GTK bindings is better at this.
You're just not good enough. If you think other languages are easier, feel free to use them.
Adam Reed
You should use rust for this, it's memory safe.
Angel King
Fucking this.
Use literally any gui library but Qt.
Brayden Brown
why dont you just use qt creator like a normal person
Jonathan Morris
>simple project >17h build time Depending on the system, this means your code is larger than the linux kernel, libreoffice and firefox combined.
How?
Nicholas Gomez
>Simple C++ program This was your mistake
Mason Hernandez
The part that has a 17h compile time isn't my project, but the QT library which you need to compile yourself from source if you want to link it statically.
Brandon Campbell
Don't forget to distribute the source if you're statically linking to Qt or else you'll be violating the GPL.
Nicholas Hill
/thread
Also, just use Swing and Java, OP.
Dylan Murphy
>You're using the largest most unwieldy library you could possibly find >You're on the warpath against dynamic linking because apparently multiple files in a zipped folder is worse than one enormous executable >You're doing all this on a laptop >You wonder why C++ is hard to work with
I could build your program in fifteen minutes and most of that would just be waiting for Qt to download/unpack.
Don't do moronic things and you won't have this problem. Just dynamically link and include the binary DLLs along with your executable like almost everyone else does.
Levi Moore
Hahahaha Ur whole post
>If you think other languages are easier, feel free to use them. They are. Literally the only reasons anyone uses C++ any more is legacy maintenance and the rare times where you need low level access for your application Oh and also luddites who won't transition to modern tech
>You're just not good enough. That's like being elitist for speaking French because it's the world's lingua Franca
Kayden Williams
forgot make -j probably
Adam Taylor
But C++ (11, 14, 17 etc) is modern tech.
Connor Cruz
>not even modules >modern tech
Caleb Taylor
Memory safety is a nice thing to have but it's pretty far down my priority list right now. Rust's crate system and community on the other hand seems really great from what I've seen.
That is an option, but I shouldn't have to change IDE for a project just because I want to change it from a command line program to a GUI program. Furthermore, afaik the things that qt creator would help with are orthogonal to the problems I have.
But they all either seem to be just as bad as QT in that respect (fairly huge, build yourself from source), or they look like crap and the first tutorials that show up on google describe the installation process on visual studio 2005 and windows XP.
Logan Cooper
Not in most applications. For a basic desktop GUI interface interface, JavaFX is current, C++ is outdated.
Lucas Foster
>distribute as a single exe A self-extracting archive or installer containing the actual application along with whatever DLLs it requires is impossible for them to handle? How do they use literally any software ever if they can't even handle a .exe installer?
A way to include source files in a proper, symbolic, fast to compile way, unlike the retarded preprocessor based header/implementation system.
Nathaniel Hughes
Actually, today's lingua franca is without a doubt English.
Daniel Young
Exactly.
Ethan Lopez
Or if there is a specific C++ library you need to use.
Thomas Turner
Mistake #1: Assuming you cannot use DLLs because your friends are not techies. Ship .exe and associated .dlls in a zip, have them extract it into a folder somewhere and run it.
Mistake #2: Using Visual Studio instead of GCC.
>No other language forces me to do 17 hour builds to make the simplest possible GUI app and bundle it into an executable
The 17 hour builds are because of YOUR OWN self-imposed restrictions. Next time, use a DLL like everyone else, you fucking retard.
Jordan Johnson
But is it free? It seems UWP and Xamarin with the .net standard framework is better!
Grayson Evans
b8/8 m8 but your actual problem is visual failio
Asher Walker
>do make -j >pc explodes because it requires 12GB of memory
Gavin Sullivan
>mfw a QML hello world is literally under 30 lines and compiles statically with no problem whatsoever You're retarded OP.
Sebastian Anderson
what the hell is the alternative? GTK? the one that breaks with every update?
Evan Ross
>installer Isn't that a chicken and egg problem? If OP could get a simple GUI program like an installer running as a single exe then he wouldn't need an installer in the first place.
Joseph Parker
Isn't this what MakeFiles are for?
Who the hell waits 17 hours for a personal program to compile.
Jack Hill
ur a jenious
Jacob Perez
What's the catch?
I'm also interested in this. Every GTK program I've used on non-GNU systems looks ugly.
Jackson Richardson
>not falling for the 16GiB RAM meme
Grayson Roberts
>why is C++ a mess I dunno. Ask Bjarne and the committee. I question your need for a gui library if you're just presenting a simulation. Perhaps it'd be more appropriate to use something like sfml or sdl.
Brody Gonzalez
I'm sure my main station will soon move to 16/32GB. Problem is I spent most of my time on a shitty laptop my school lent me for my studies and it has 4GB with some shitty CPU.
Daniel Price
Including the .dll dependencies into a zipped folder is what I ended up doing.
I'm just kind of annoyed because I'm used to just sending packaged jars when I make something in Java or Clojure. With a shitty swing GUI these just work straight out of the box across all windows/mac/linux desktops that I send them to without any fiddling around.
Ian Smith
Is this true?
Michael Hall
Actually your problem is Windows. But yeah, headers are fucking garbage. Use Nuklear for easy cross-platform GUI.
Jose Thomas
>What's the catch? I found it. >QML is the language; its JavaScript runtime is the V4 engine and Qt Quick is the scenegraph-based UI framework I'm assuming this means a high runtime cost.
Colton Brooks
This is why I avoid the GPL licence like the plague. I don't even see who this serves. It's not like you distributing compatible binary libraries with your program makes it more open source friendly.
Kevin Smith
Just distribute 50MB of DLLs like everyone else. Hopefully qt's dll packager picks the right ones and doesn't fuck up. :^)
Christian Diaz
>Windows dependency management is so bad that developers just do this >Microsoft still doesn't ship file dedup for non-server variants >most Windows users probably have 500 copies of 500 libraries Frustrated
Carson Hernandez
hey it's the one faggot that brings up Blend/UWP in every thread
for UI glue it's fine, you're not going to be doing anything performant in a UI thread anyway
Connor Robinson
>visual studio >windows
Here's your problem.
David Price
I was thinking more in terms of memory use than cpu cycles.
Charles Rogers
No, OP's problem is that he cannot statically link his QT monstrosity, not that you can't get a GUI application in a single .exe. He could even make a self-extracting archive with 7zip or some shit, doesn't need to write an installer by himself.
Christopher Green
kid please leave
Isaiah Wilson
>Windows There is your problem, it such a pain to develop on Windows.
Samuel Davis
C++ is not microsoft word documents. They aren't meant to be passed around the office like that
The way to distribute a C++ program is to give the source and have them compile it for their own machine.