title: How to build a DLL version of libjpeg 9b?
body: <p>I want to build a DLL version of libjpeg 9b. According to the document <a href="https://msdn.microsoft.com/en-us/library/ms235636.aspx" rel="nofollow noreferrer">here</a>, it seems that we need to add a preprocessor <code>__declspec(dllexport)</code> or <code>__declspec(dllimport)</code>   before the declaration of each function to be exported, in addition to setting the Configuration Type to "Dynamic Library (.dll)". But this is not an easy job because there are so many functions in libjpeg. So, is there any short-cut or work-around to build a DLL libjpeg without or with little modification of the jpeglib.h? Is there any DLL-ready source of libjpeg 9b available? I am using Visual Studio 2015 on Windows 7 64bit. Thanks for your answer.</p>
  
  <p>PS: I downloaded the source of libjpeg 9b from <a href="http://www.ijg.org/files/" rel="nofollow noreferrer">http://www.ijg.org/files/</a>. Is this the official place to download it? I ask because the beginning bytes of .vcxproj (originally .v10) files seems invalid (C2 8B C2 AF C2 A8) so Visual Studio is unable to open it.</p>