The code snippet is for Visual C++ but you are using Dev C++.
The first line
#pragma comment (lib,"cryptlib.lib")
is Microsoft specific and links the application with the specified library. You must use the appropiate steps for your development environment to link your application with that library.
However, you must ensure to have a library version that is compatible with your development environment. If necessary you must build the library using your Dev C++.