I can't make .elf and .hex file

They exist. Carefully study the verbose output of the link step to determine where these temporary files are to be found. On Windoze you'll see file names like this:

C:\Users\your_name\AppData\Local\Temp\arduino_build_219033/something.ino.elf"