Conversation

never writing c code ever again

3
0
0

@aqua @kemona_halftau yeah, I was about to say

you didn't tell the compiler you want to use x11 lol

1
0
1

@solonovamax @aqua its my first time writing c code from scratch and compiling it with clang directly

2
0
0
@kemona_halftau @aqua @solonovamax Happens to the best of us
It did actually compile fine, which is why there aren't errors, but didn't link properly
That's a distinction that's worth learning about
0
0
1

@kemona_halftau @aqua girl, use a build tool

just throw like meson at it or smth idk what good c/c++ build tools are these days

1
0
1

@solonovamax @kemona_halftau @aqua i mean i'd say knowing what your build tool does is good, if it's obscure you are helpless to it

0
0
1

@kemona_halftau why do you put the * next to the type rather than next to the variable name? I don’t know if you already know this but a declaration like int* a, b; will result in a being of type int* and b being of type int, which is why usually people put the * next to the variable name (otherwise declarations like that are confusing, because written like that it looks like they should both be int*)

1
0
1

@noisytoot i rarely use that compound type declaration syntax, and my brain always gets confused reading “[type] [pointer][name]”
if i ever do use that syntax, i would put the asterisk after the space

0
0
1