gdc -I/usr/include/gtkd-3 -L-ldl -L-libgtkd-3 test.d
You're using command-line arguments as if you are compiling with dmd.
On gcc `-L-libgtkd-3` means "add _directory_ ./-libgtkd-3 to the list of directories to be searched for `-l`".
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Directory-Options.html#index-L Correct invocation: gdc -I/usr/include/gtkd-3 -ldl -lgtkd-3 test.d