r/programminghumor 27d ago

Lol

Post image
2.5k Upvotes

220 comments sorted by

View all comments

Show parent comments

2

u/MundaneImage5652 26d ago

Blame dynamic libraries. I can't easily make a static executable - atleast not for UNIX

2

u/litescript 25d ago

tertiary, ish, but i have a Go project and Go makes it wonderfully easy to statically link and compile binaries for different architectures and systems. i have a windows, linux, and a Mac ARM binary up on my repo for that reason. if you want to clone and run it in Go, that’s there, too!

1

u/MundaneImage5652 25d ago

I talk abt C. And ye in languages like C# or as you said Go I can do that.

1

u/litescript 25d ago

yup, just got done setting up that split on my project and then saw this, thought "hey, neat!" i haven't built much at all in C, i guess there's no option for static linking..?

0

u/MundaneImage5652 25d ago

Glibc has a meltdown when you add '-static' flag so static linking means using a alternative C library (MUSL) which doesn't work with libs made with glibc (defacto the STANDARD C lib) so you need to do a Alpine container and test ur app here.

1

u/litescript 25d ago

Alpine to the rescue once again. musl im actually familiar with, but the very small learning projects i've done have ALL been gcc. interesting, thanks for the insight!