How to double-click to run the gtk3 program on the gnome desktop

I used ubuntu20.04, installed libgtk3.0-dev, and compiled a test program:
gcc *.c ./test.c -o test pkg-config --cflags --libs gtk+-3.0

In the terminal, I can use ./test to start the gtk program. but in the gnome desktop environment, I double-click it and it will not start, and nothing happens.

I don’t understand what is going on ?

If you want to run a program by clicking on an icon, you need a desktop file. You cannot simply click on binaries and expect them to execute.

i got it, thanks very much