The International Simutrans Forum

 

Author Topic: Compile error on Linux gcc 4.3.1 (r2044 or newer)  (Read 2167 times)

0 Members and 1 Guest are viewing this topic.

msrex

  • Guest
Compile error on Linux gcc 4.3.1 (r2044 or newer)
« on: October 28, 2008, 10:19:25 PM »
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

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)
« Reply #1 on: October 29, 2008, 03:33:07 AM »
Is it solved if you include the string.h headers:
#include <string.h>
at the beginning of the file?


msrex

  • Guest
Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)
« Reply #2 on: October 29, 2008, 12:54:17 PM »
Yes, it does on both gcc versions.

Markus

Offline isidoro

  • Devotee
  • *
  • Posts: 1142
Re: Compile error on Linux gcc 4.3.1 (r2044 or newer)
« Reply #3 on: October 30, 2008, 12:17:32 AM »
Perhaps it should be a good idea then to include that line in trunk.