[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]

Making apps for xfce, kde, etc

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: 14
Thread images: 1

File: betamale.jpg (75KB, 1280x1024px) Image search: [Google]
betamale.jpg
75KB, 1280x1024px
Let's say I made a game like blackjack in C++ that is command line only. If I am using linux with gnome I can turn it into a graphical app using gtk3. Let's say my friend doesn't use gnome on linux. He uses freeBSD xfce or KDE, or something else entirely. My command line app will still be fine for him, but can I send the gtk3 gui app? If not would I have to make the whole thing again using qt or something else? Is there a more basic x-11 app making library that works with all of them? Sorry if this is a dumb question, I am kind of new to programming and linux in general.

>inb4 install gentoo
>inb4 remake it in haskell
>>
Nobody?

Sorry for not shitposting about which desktop background looks the best.
>>
>>55861176
No, the graphical library you use has nothing to do with the desktop environment. It should work as long as he uses Linux. Also BSD but you'll need to recompile.
>>
>>55861176
>>>/g/fglt
>>
>>55861176
>apps
>>
If you use GTK3 it will only run on computers with compatible versions of the GTK3 libraries.

if you're running incompatible library versions but are using parts of the API that are common to both, then you can just compile against the other libraries too.

If you're switching entire OS's, then you probably should recompile. Again if you use only features common to both your versions it will compile. If the behavior changes in a way that affects your program you will have to make slightly different versions.

Same goes for QT. For what it's worth I have GTK, QT, and OpenGL installed. I can run programs that use those and were compiled against compatible libraries. Since my distro or I do the compiling that's never a problem.

Static linking might reduce the needed for library compatibility. In that case you only have to worry about how your program interfaces with the OS.
>>
>>55861176
As someone who uses OpenBSD, let me explain. If your C++ is portable, the command line program will still work. He'll just compile it himself.
If it uses GTK3, he'll have to install the GTK3 package, so you'll have to mention that in your README file.

>Is there a more basic x-11 app making library that works with all of them?
Yes, it's called Xaw.
https://en.wikipedia.org/wiki/X_Athena_Widgets
It's what XTerm, xcalc, and xedit are made in.
>>
>>55861476
>>55861365

Thanks guys I think that kinda clears it up. I wasn't meaning that I send him the binaries, I meant that I would send the code and he would compile it on his comp.

So in other words: if I write in in gtk3, he must have the gtk3 libraries in order to compile it. If he doesn't have those libraries it won't compile. But it doesn't matter if it's gnome, kde, whatevs as long as the gtk libraries are present?

Thanks for the tip on XAW btw, I will look into that.
>>
>>55861561
Correct, as long as the libraries are there, he should be able to compile it and it'll run regardless of his WM (window manager) or DE (desktop environment).
Also, be prepared for people to tell you Xaw is oldfashioned, but just read up on it and you'll do fine.
Since you say you're new to programming, try programming more programs without graphics first, for practice. Maybe try Project Euler, a list of programming/math problems.
>>
>>55861627
Not op but, thanks for not being cancer :^)
>>
>>55861998
The cancer on /g/ usually comes from GNU fans.
>>
>>55861998
>using the smiley with a carat nose
>>
>>55861176
>apps
>using GTK instead of Qt
>>
>>55865906
>using Qt instead of Xaw
Thread posts: 14
Thread images: 1


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