profile
gamedev stuff
post-thumbnail

Why SDL doesn't allow `int main(void)`

Probably the most common mistake SDL beginners do is this: ... Hang on a second, it's just another Hello, world! program with the SDL.h header included! What could possibly go wrong? Surprisingly, this code fails to link, even if you set up the compiler and the linker correctly. The error's gonna say something similar to this: To fix this, you have to put int main(int argc, char* argv)* instead of **int main(void). But why is it like that? The C language [allows the `in

2022년 2월 5일
·
0개의 댓글
·