[問題] SDL_image的IMG_Load() done
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
Microsoft Visual Studio 2010
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
SDL, SDL_image
問題(Question):
IMG_Load()回傳NULL
程式碼(Code):(請善用置底文網頁, 記得排版)
//如果使用.bmp圖檔他就會正確傳回
message = IMG_Load("image/hello.bmp");
if(message == NULL) return 0x1;
//如果我使用另一個.png的圖他就會回傳NULL
message = IMG_Load("image/hello.png");
if(message == NULL) return 0x2;
補充說明(Supplement):
痾我是照著這個tutorial做下去的
實在不知道原因出在哪裡
有沒有板友有過這種問題經驗的可以分享一下@@
http://lazyfoo.net/SDL_tutorials/lesson03/index.php
另外想問
哪裡會比較多人在討論SDL的使用呢?
還是他其實很簡單...只有我在遇到問題QQ...
--
抱歉我解決了...
我以為只要把 SDL_image.dll 跟執行檔放一起就好
忘記放 zlib1.dll 和 libpng15-15.dll
--
▁ ▁ ▂
▌▉ ▉▌▇▆▉▌▆ ▆ ▇▍ ▅ ▆ ▄ ▅▆▄ ▆▇▅
▊██▊▋▊ ▊█▊▌▎▏▎▍▎▊ ▊ ▋ ▉ ▊ ▉
▉▋ ▋ █▆▄▉▊▎▎▏▎▏▎▏▋ ▋ █▆▊ █▇▊
▌ ▌ ▂▃▊ ▋▍█ ▍▆█ ▌ ▌ ▂▃▋ ▏▄▋ 2007~2010...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 36.224.248.123
→
09/12 17:37, , 1F
09/12 17:37, 1F
→
09/12 17:38, , 2F
09/12 17:38, 2F
※ 編輯: lf21201 來自: 36.224.248.123 (09/12 18:13)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章