Compilation error: ‘strlen’ was not declared in this scope
Posted: Fri Dec 05, 2008 5:44 am
I finally compiled LOVE on this 64-bit Arch Linux system I'm using now and I had one minor problem:
I added #include <stdio.h> and #include <string.h> to the file physfs/File.cpp, and then compilation worked.
I had a similar problem with box2d, only with much more files, not just one as in LOVE's case.
I'm not sure what the reason is, but think that it's the stricter rules of some newer gcc or g+ version.
Thought I'd let you know.
ATTENTION FORUM ADMIN: if I replace "g+" with "g++" this post will not let me submit this post. Whaat?
Code: Select all
physfs/File.cpp: In member function ‘virtual bool love_physfs::File::write(const char*, int)’:
physfs/File.cpp:112: error: ‘strlen’ was not declared in this scope
make[2]: *** [physfs/File.o] Error 1
I had a similar problem with box2d, only with much more files, not just one as in LOVE's case.
I'm not sure what the reason is, but think that it's the stricter rules of some newer gcc or g+ version.
Thought I'd let you know.
ATTENTION FORUM ADMIN: if I replace "g+" with "g++" this post will not let me submit this post. Whaat?