C++

>> 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.

Other urls found in this thread:

open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4465.pdf
twitter.com/SFWRedditImages

qt is one of the largest projects built with c++

You're just not good enough. If you think other languages are easier, feel free to use them.

You should use rust for this, it's memory safe.

Fucking this.

Use literally any gui library but Qt.

why dont you just use qt creator like a normal person

>simple project
>17h build time
Depending on the system, this means your code is larger than the linux kernel, libreoffice and firefox combined.

How?

>Simple C++ program
This was your mistake

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.

Don't forget to distribute the source if you're statically linking to Qt or else you'll be violating the GPL.

/thread

Also, just use Swing and Java, OP.

>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.

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

forgot make -j probably

But C++ (11, 14, 17 etc) is modern tech.

>not even modules
>modern tech

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.

Not in most applications.
For a basic desktop GUI interface interface, JavaFX is current, C++ is outdated.

>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?

You're only required to share it if you're asked.

What the fuck is a module.

open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4465.pdf
>tldr: no more header files

A way to include source files in a proper, symbolic, fast to compile way, unlike the retarded preprocessor based header/implementation system.

Actually, today's lingua franca is without a doubt English.

Exactly.

Or if there is a specific C++ library you need to use.

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.

But is it free? It seems UWP and Xamarin with the .net standard framework is better!

b8/8 m8 but your actual problem is visual failio

>do make -j
>pc explodes because it requires 12GB of memory

>mfw a QML hello world is literally under 30 lines and compiles statically with no problem whatsoever
You're retarded OP.

what the hell is the alternative? GTK? the one that breaks with every update?

>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.

Isn't this what MakeFiles are for?

Who the hell waits 17 hours for a personal program to compile.

ur a jenious

What's the catch?

I'm also interested in this. Every GTK program I've used on non-GNU systems looks ugly.

>not falling for the 16GiB RAM meme

>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.

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.

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.

Is this true?

Actually your problem is Windows. But yeah, headers are fucking garbage. Use Nuklear for easy cross-platform GUI.

>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.

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.

Just distribute 50MB of DLLs like everyone else. Hopefully qt's dll packager picks the right ones and doesn't fuck up.
:^)

>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

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

>visual studio
>windows

Here's your problem.

I was thinking more in terms of memory use than cpu cycles.

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.

kid please leave

>Windows
There is your problem, it such a pain to develop on Windows.

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.