gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > FreeImage.dll?

#172244 - mikedpw0 - Wed Jan 27, 2010 1:15 am

Hello! If you check my post count you'll see I'm new here.

I am trying to follow Patater's tutorial -

http://patater.com/manual

I have typed out the entirety of the first program and I've set up devkitpro correctly and all that. I know it works because i've followed some other, much simpler tutorials and was able to compile my code and run it on a DS emulator.

However, when I tried to compile my code from this tutorial i got an error about a missing file -

FreeImage.dll

I googled it, downloaded it, and put it into my \windows\system32 directory. NOW when I try to compile the program I get this:

"The procedure entry point _FreeImage_FlipVertical@4 could not be located in the dynamic link library FreeImage.dll"

This must have something to do with grit since grit handles the images so they can be used by NDS programs. However knowing this doesn't really help me much.

I've done a fair amount of googling on the problem and all I could find were a few forum posts of people having the same problem (though as far as I could tell their coding was not related to NDS programming). The one potentially useful response said something about the possibility of multiple copies of the FreeImage.dll file being present in the system and causing some kind of conflict.

However since I had just been getting the "FreeImage.dll cannot be found" error before putting a single copy of FreeImage.dll on my system I can't imagine how this would be the case.

Any ideas?

#172245 - zelbo - Wed Jan 27, 2010 2:11 am

try putting it in the same folder as grit, like so:
c:\devkitpro\grit\freeimage.dll

#172247 - mikedpw0 - Wed Jan 27, 2010 3:27 am

Zelbo, your solution was not QUITE what i needed, but it did lead me to figure out the problem.

I never actually downloaded grit. Kind of embarrassing but at the time i thought it was just something that came with devkitpro or the tutorial files i downloaded or something.

When i DID download grit it came with it's own FreeImage.dll that was different from whatever one I had downloaded. I tried replacing the one in system32 with this one and still had the same problem. So I just deleted it from system32 altogether so it was only in the grit directory (as you suggested) and, well, my code still doesn't compile, but so far it looks like that's just because of my careless coding typos. I'm gonna go through and try to iron all that out. If it still doesn't work I'll probably be back here begging for more help.

Thanks alot though. The only reason your answer wasn't spot on was because i didn't provide enough information about the problem (the fact that I never downloaded grit).

#172252 - SteveH - Wed Jan 27, 2010 3:16 pm

This is actually a known issue with the supplied version of grit in the current release of devkitARM. WinterMute is aware of it and has stated that it's missing from the packages. It will be fixed in the next version of devkitARM (release 28) which WinterMute is working on now.

The reason your getting that dll error "The procedure entry point _FreeImage_FlipVertical@4 could not be located in the dynamic link library FreeImage.dll" is due to a different version of FreeImage being used to compile grit. The correct place to put the FreeImage.dll is as zelbo said in the devkitPro folder next to grit.exe, but you need to get the correct FreeImage.dll file.