[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

C++

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 53
Thread images: 3

File: CPlusPlus.jpg (36KB, 433x455px) Image search: [Google]
CPlusPlus.jpg
36KB, 433x455px
>> 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.
>>
qt is one of the largest projects built with c++
>>
>>59061763
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.
>>
>>59061781
Fucking this.

Use literally any gui library but Qt.
>>
>>59061763
why dont you just use qt creator like a normal person
>>
>>59061763
>simple project
>17h build time
Depending on the system, this means your code is larger than the linux kernel, libreoffice and firefox combined.

How?
>>
>>59061763
>Simple C++ program
This was your mistake
>>
>>59064325
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.
>>
>>59061763
Don't forget to distribute the source if you're statically linking to Qt or else you'll be violating the GPL.
>>
>>59064976
/thread

Also, just use Swing and Java, OP.
>>
>>59061763
>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.
>>
>>59062565
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
>>
>>59064325
forgot make -j probably
>>
>>59065074
But C++ (11, 14, 17 etc) is modern tech.
>>
>>59065105
>not even modules
>modern tech
>>
>>59062597
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.

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

>>59062639
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.
>>
>>59065105
Not in most applications.
For a basic desktop GUI interface interface, JavaFX is current, C++ is outdated.
>>
>>59061763
>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?
>>
>>59064976
You're only required to share it if you're asked.
>>
>>59065232
What the fuck is a module.
>>
>>59065901
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4465.pdf
>tldr: no more header files
>>
>>59065901
A way to include source files in a proper, symbolic, fast to compile way, unlike the retarded preprocessor based header/implementation system.
>>
>>59065074
Actually, today's lingua franca is without a doubt English.
>>
>>59066218
Exactly.
>>
>>59065074
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.
>>
>>59065256
But is it free? It seems UWP and Xamarin with the .net standard framework is better!
>>
>>59061763
b8/8 m8 but your actual problem is visual failio
>>
>>59065100
>do make -j
>pc explodes because it requires 12GB of memory
>>
File: 7099f1.jpg (67KB, 200x245px) Image search: [Google]
7099f1.jpg
67KB, 200x245px
>>59061763
>mfw a QML hello world is literally under 30 lines and compiles statically with no problem whatsoever
You're retarded OP.
>>
>>59062639
what the hell is the alternative? GTK? the one that breaks with every update?
>>
>>59065331
>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.
>>
>>59061763
Isn't this what MakeFiles are for?

Who the hell waits 17 hours for a personal program to compile.
>>
>>59066218
ur a jenious
>>
>>59070405
What's the catch?

>>59062639
>>59070492
I'm also interested in this. Every GTK program I've used on non-GNU systems looks ugly.
>>
>>59070392
>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.
>>
>>59070669
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.
>>
>>59065060
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.
>>
>>59065870
Is this true?
>>
>>59061763
Actually your problem is Windows. But yeah, headers are fucking garbage. Use Nuklear for easy cross-platform GUI.
>>
>>59070650
>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.
>>
>>59064976
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.
>>
File: 1391392096070.jpg (206KB, 649x638px) Image search: [Google]
1391392096070.jpg
206KB, 649x638px
Just distribute 50MB of DLLs like everyone else. Hopefully qt's dll packager picks the right ones and doesn't fuck up.
:^)
>>
>>59070768
>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
>>
>>59069924
hey it's the one faggot that brings up Blend/UWP in every thread

>>59070722
for UI glue it's fine, you're not going to be doing anything performant in a UI thread anyway
>>
>>59061763
>visual studio
>windows

Here's your problem.
>>
>>59070843
I was thinking more in terms of memory use than cpu cycles.
>>
>>59070595
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.
>>
>>59065901
kid please leave
>>
>Windows
There is your problem, it such a pain to develop on Windows.
>>
>>59061763

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.
Thread posts: 53
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.