They gave who came to the meeting a book.
They gave whoever came to the meeting a book.
They gave those who came to the meeting a book.
-----------------------------------------------------------------------------------
Some say the first sentence is grammatically sound, which I doubt.
What do you think of it?
Nope. Not correct. Should be the last example "those who"
Not a teacher - AmE native
The second is fine.