我遇到了同樣的問題。助推GIL與來自www.ijg.org的獨立外部圖書館密切相關(似乎大部分是德國人)。對於微軟平臺, 我發現沒有安裝程序 - 您必須編譯源代碼。對我來說更糟糕的是 ,有一些Visual Studio配置文件,但不是v。8. 所以我從頭開始創建自己的解決方案/項目。不要驚慌,這不是 如此糟糕。它很容易編譯。簡而言之,這是如何:
[1]從www.ijg.org下載源代碼壓縮文件jpegsr9b.zip。
[2]在解壓源代碼樹的目錄中的某個地方創建一個簡單的基於控制檯的Visual Studio項目(「jconfig」)。只添加1個源代碼文件:ckconfig.c。編譯並運行程序。它將生成一個頭文件jconfig.h。將此文件複製或移動到主源代碼目錄 - 此軟件包中只有一個包含源代碼的目錄。 [3] make another Visual Studio project that will create the library for the JPG package. Configure the project to make a library (I assume you know how), and include the JPG package source code directory in the "Additional Include Directories" configuration parameter.
[4]包含所有的源代碼文件(它們都是.c文件),除了以下內容:rdjpgcom.c,wrjpgcom.c和jpegtran.c。這些文件是獨立程序(每個都帶有main() - 顯然你不希望它們在庫中)。 [5] exclude 2 of the following files (ie, include only 1 of these files): jmemname.c, jmemnobs.c, or jmemansi.c. They contain a different implementations of a "memory manager". I used jmemnobs.c, as the comments indicated it was the simplest implementation, and I just wanted the code to work and was in a hurry. So, in other words, if you did step [4] and included all .c files, now take out 2 of the 3 files listed from your main project file.
[6]建立圖書館。它是完全獨立的,所以所有的文件都應該編譯好。