The error: main.cpp:75: error: ‘memcmp’ was not declared in this scope occurs during a full make at flac-1.2.1/examples/cpp/encode/file I have fixed it in my distribution by adding a #include <string.h> into main.cpp
Me too.
Making all in encode make[4]: Entering directory `/usr/src/flac/flac-1.2.1/examples/cpp/encode' Making all in file make[5]: Entering directory `/usr/src/flac/flac-1.2.1/examples/cpp/encode/file' if g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -DFLaC__INLINE=__inline__ -DNDEBUG -I../../../.. -I./include -I../../../../include -march=core2 -msse4 -mcx16 -msahf -O2 -pipe -MT main.o -MD -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi main.cpp: In function 'int main(int, char**)': main.cpp:75: error: 'memcmp' was not declared in this scope make[5]: *** [main.o] Error 1
Easily fixed as you say:
eric@boxij:~$ cat /usr/src/flac/patches/flac-1.2.1-fix_memcmp_not_declared-1.diff diff -Naur flac-1.2.1-orig/examples/cpp/encode/file/main.cpp flac-1.2.1-eric/examples/cpp/encode/file/main.cpp --- flac-1.2.1-orig/examples/cpp/encode/file/main.cpp 2007-09-13 17:58:03.000000000 +0200 +++ flac-1.2.1-eric/examples/cpp/encode/file/main.cpp 2010-04-30 13:36:35.000000000 +0200 @@ -30,6 +30,7 @@
#include <stdio.h> #include <stdlib.h> +#include <string.h> #include "FLAC++/metadata.h" #include "FLAC++/encoder.h"
eric@boxij:~$
Thank you, this fixed the problem.
You seem to have CSS turned off. Please don't fill out this field.
This was fixed in the flac 1.3.0 release.
Log in to post a comment.
Me too.
Making all in encode
make[4]: Entering directory `/usr/src/flac/flac-1.2.1/examples/cpp/encode'
Making all in file
make[5]: Entering directory `/usr/src/flac/flac-1.2.1/examples/cpp/encode/file'
if g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -DFLaC__INLINE=__inline__ -DNDEBUG -I../../../.. -I./include -I../../../../include -march=core2 -msse4 -mcx16 -msahf -O2 -pipe -MT main.o -MD -MP -MF ".deps/main.Tpo" \ -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp; \ then mv -f ".deps/main.Tpo" ".deps/main.Po"; \ else rm -f ".deps/main.Tpo"; exit 1; \ fi
main.cpp: In function 'int main(int, char**)':
main.cpp:75: error: 'memcmp' was not declared in this scope
make[5]: *** [main.o] Error 1
Easily fixed as you say:
eric@boxij:~$ cat /usr/src/flac/patches/flac-1.2.1-fix_memcmp_not_declared-1.diff
diff -Naur flac-1.2.1-orig/examples/cpp/encode/file/main.cpp flac-1.2.1-eric/examples/cpp/encode/file/main.cpp
--- flac-1.2.1-orig/examples/cpp/encode/file/main.cpp 2007-09-13 17:58:03.000000000 +0200
+++ flac-1.2.1-eric/examples/cpp/encode/file/main.cpp 2010-04-30 13:36:35.000000000 +0200
@@ -30,6 +30,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "FLAC++/metadata.h"
#include "FLAC++/encoder.h"
eric@boxij:~$
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Thank you, this fixed the problem.
This was fixed in the flac 1.3.0 release.