Hi, i,m new in Flare Forums, yesterday i find this engine (something I've been looking for a while) and the true, this engine have more future.
I want make my own ARPG based in Medieval, and want edit or add any things in the source.
I have Dev C++ 4.9.9.2, and i create new project (API?). Add all source files and in Project Options, i linked all SDL objects.
The program said me:
[Linker error] undefined reference to `SDL_Quit'
[Linker error] undefined reference to `SDL_RWFromFile'
[Linker error] undefined reference to `TTF_WasInit'
(More errors)
How i can fix this problem?
Thanks in advance, sorry for my english i,m spanish xD.
Sounds like SDL isn't linked properly.
Solving this is usually very specific to the IDE or compiler you're using. I suggesting looking up how to set up an SDL project in Dev C++. Maybe this one is up to date?
http://lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/index.php
Thanks for info :D. Now i reduced more errors, but I still have some error.
Follow this guide step by step and the number of errors has been reduced a lot but there is some.
Undefined reference to TTF_XXX (sdl_ttf suposse)
[Linker error] undefined reference to `SDL_gfxBlitRGBA'
more undefined references to `SDL_gfxBlitRGBA' follow
[Linker error] undefined reference to `WinMain@16'
I have Windows 7 64 bits,
In project linked i put:
-lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_ttf
Thanks for reply!
The same way you added SDL, you'll have to do that for SDL_image, SDL_mixer, SDL_ttf.
The SDL_gfxBlitRGBA issues is because one of the files in the project is a .c file instead of .cpp. Either set up your project to also compile .c files (not sure how to do that in your IDE) or just rename that file to .cpp
Yep! Now only have errors with SDL_ttf, is more strange, i add linked object into project
The only thing that comes to mind about SDL_ttf is that it's on version 2.0 and the other libraries are version 1.2. So if you had to type out the version number anywhere in the settings, you may want to check for that.
I did this:
New Empty Project -> Win32 Gui.
Add all c++ and header Flare files into project.
In Compiler Options i add in directories include folder with SDL files and in Libraries i add lib folder with SDL, sdlmain, SDL_mixer, SDL_ttf and SDL_image.
In linker i put this:
-lmingw32
-lSDLmain
-lSDL
-lSDL_image
-lSDL_mixer
-lSDL_ttf
And Dev C++ say me: Undefined reference to TTF_xxx.
It's as if he did not recognize the library or as if it were not linked to the project. Is more strange.
Is solved, it seems that the library SDL_ttf not coded for call by -l, put on linker options, add lib and put the exact address and I already compiled without errors.
Will do a video guide for those who are compiling with Dev C + + to see xD.
Greetings!