Hello all, I’ve been getting a strange error when using SDL_ttf. It basicly said that the file “libfreetype.dll” couldn’t be found. I’ve narrowed the error down to when it loads the ttf file (which I placed in the main directory and the release/debug directory, just in case) by commenting out portions of the code, but I could be wrong as to the location of the error. I use Visual Studio 2008 express version since I couldn’t figure out how to build the SDL files in the 2010 version. I’m running windows vista but i can try on windows xp if need be. I installed the newest freetype version and built that, but it produced a .lib file instead of the desired .dll one. I downloaded the binaries for freetype too but I couldnt find the libfreetype.dll there either… I found files with variations of that filename but no exact matches. Do I rename one of the dll files or something? I couldn’t find the exact file on the internet either and I searched this forum for an answer without avail
… I can post the code on here if thats allowed (I can’t figure out how to attach, I guess that’s not allowed or something). My experience in programming is mainly confined to console programs and my skills are at the beginning level (although my general computer skills are definitely higher then the beginning level). This would have been my first visual program, but it has that error. If there is any more info that you need in order to help, then ask away. Also thank you to all who might want to help me in this problem.------------------------
i never have time to do the things i wanna do when in school, and when school’s out, i dont wanna do the things i have time for
Ok, now I feel stupid. This whole time it wasn’t working cause I was using relative addresses for the files (i.e: “font.ttf” instead of “C:\font.ttf” for example). I made them complete and voila! The tutorial files were in relative address form so I thought it was ok, but nooooooo I guess it didnt work well that way… Go figure… Oh! and once the complete address were in it loaded libfreetype-6.dll just fine! It didn’t even need a “libfreetype.dll”. O well it works now so thats all I’m worried about… Took me about 3 weeks to realize this… Just goes to show you, nothing is as it seems when solving errors in programming…------------------------
i never have time to do the things i wanna do when in school, and when school’s out, i dont wanna do the things i have time for
Relative pathnames are based at the current working directory when running
your executable. Perhaps you’re referencing them from the source file
location? Try:
#include <stdlib.h>
#include <unistd.h>
…
char cwd[FILENAME_MAX];
getcwd(cwd, FILENAME_MAX);
printf(“cwd: %s\n”, cwd);
If you’re running the program by double-clicking it in a file browser, then
this should be set to the directory containing the executable (except for
silly ones like Konqueror). If you’re following a shortcut or the
executable is found via the PATH environment variable, then this is not
going to be the case. There are system-dependent ways to programmatically
locate the executable in that case.
Jonny DOn Sat, Aug 21, 2010 at 12:35 AM, sciencekid wrote:
Ok, now I feel stupid. This whole time it wasn’t working cause I was
using relative addresses for the files (i.e: “font.ttf” instead of
“C:\font.ttf” for example). I made them complete and voila! The tutorial
files were in relative address form so I thought it was ok, but nooooooo I
guess it didnt work well that way… Go figure… Oh! and once the complete
address were in it loaded libfreetype-6.dll just fine! It didn’t even need
a “libfreetype.dll”. O well it works now so thats all I’m worried about…
Took me about 3 weeks to realize this… Just goes to show you, nothing is
as it seems when solving errors in programming…
i never have time to do the things i wanna do when in school, and when
school’s out, i dont wanna do the things i have time for
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org