Jump to content

  • Log In with Google      Sign In   
  • Create Account


endless11111

Member Since 04 Apr 2012
Offline Last Active Jun 17 2013 12:06 AM
-----

#4968323 TTF Problem

Posted by endless11111 on 10 August 2012 - 10:36 PM

Hello again
I now have another problem xP with my C++ and SDL.
Im now learning to use the ttf library and Ive linked all the libraries together, and theirs no issues with the compiler trying to find the functions or anything, but when I try to load a font, the ttf_openfont command cant find "lazy.ttf" and returns null, so I end up with the message that the program returned 4, meaning the font failed to load.

Any help as to why the program cant find the font? Posted Image

Thanks!


do you have the font file in the save directory as the project file? by font file i mean the actual lazy.ttf file, not the dll's. if the error is due to the program being unable to load the font file it means the compiler cant find the lazy.ttf file. just make sure the lazy.ttf file is in the same directory as your compiler's project file if you are running the program through the compiler. if you run it using the .exe file put the lazy.ttf file in the same directory as the .exe.


#4938415 Beginner's Problem with SDL in C++

Posted by endless11111 on 08 May 2012 - 10:14 AM

the image might not be loading up because you don't have the image file in the same folder as the project file. if you are compiling a program, all the files accosiated with the program must be in the same folder as the .cpp files, and if you are running the .exe file, all the files accosiated with the program must be in the same folder as the .exe file. and i am not really familiar with text intput and output in sdl using cin and cout, but as far as i know, you can't use cin or cout like you would with a console application, you can't just output text or input text directly using cin and cout.


#4938410 [C++] Simple audio

Posted by endless11111 on 08 May 2012 - 09:55 AM

It would definetly make it alot easier to use SDL_mixer


PARTNERS