I am guessing that the comment pragma just adds the libraries. Under C::B adding Libraries is done like this.
Project -> Build Options
Tab "Linker Settings"
Try adding the Libraries under "Link Libraries"
I would try the names of listed below, GCC does not use .lib extension, and see if they work.
ddraw
dxguid
Tim S