I found a solution to the problem..If anyone is stuck with the same problem as mine,this can help you..
To generate a static library .a file from .def file for Linux ,Go to command prompt
dlltool -d somedll.def -l libsomedll.a
To generate a static library .lib file from .def file for Windows, Go to command prompt
dlltool -d somedll.def -l libsomedll.lib