SDL undeclared filename and apply_surface not working |
Blackmantis
|
I've recently dived into some SDL tutorials, but am having difficulty compiling this one in particular using DevC++ with the SDL library: http://lazyfoo.net/SDL_tutorials/lesson05/index.php
I am getting this particular error: `filename' undeclared (first use this function) and it points to the filename.c_str() ); area of the code, as well as a few others listed in the compile log. I'd like to also investigate the "apply_surface" not being recognized as well. I have included the following headers:
using namespace QuickCG; Linker options include suggestions based on other threads I've found with the same issue, it appears I'm not alone but I haven't quite found the solution that applies to my code yet:
CODE SNIPPET:
etc etc COMPILE LOG:
Any suggestions or advice would be greatly appreciated. I'm yet another newbie to the whole C++ scene, but this is more of a learning experiment than anything else. |
|||||||||||||||||||
|
SDL undeclared filename and apply_surface not working |
Alberto Corona
Guest
|
On Tuesday, April 01, 2014 04:53:47 Blackmantis wrote:
You are answering your own question, filename is undeclared meaning that it has no value before you use c_str().
Here, you use filename.c_str() without it actually being defined as a string before converting it to a const char* _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
Blackmantis
|
No problems, thanks for getting back to me guys, I have it working now. I was just a bit surprised that the source code for the tutorial did not include that part from lesson 02.
|
|||||||||||
|