Skip to main content
Topic: Compile error on Linux gcc 4.3.1 (r2044 or newer) (Read 3330 times) previous topic - next topic

Compile error on Linux gcc 4.3.1 (r2044 or newer)

Hi!

When compiling r2044 or newer on Linux (OpenSUSE 11.0, gcc 4.3.1) I get an compile error in
besch/reader/image_reader.cc :
===> CXX besch/reader/image_reader.cc
besch/reader/image_reader.cc: In member function ‘virtual obj_besch_t* image_reader_t::read_node(FILE*, obj_node_info_t&)’:
besch/reader/image_reader.cc:127: error: ‘memcmp’ was not declared in this scope
make: *** [besch/reader/image_reader.o] Error 1

With r2041 it still works.
I also tried this on a newer gcc (4.3.3) with the same results.
On an older version (gcc 4.2.1) it works though.

Best,

  Markus

Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)

Reply #1
Is it solved if you include the string.h headers:
#include <string.h>
at the beginning of the file?


Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)

Reply #2
Yes, it does on both gcc versions.

Markus

Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)

Reply #3
Perhaps it should be a good idea then to include that line in trunk.