Skip to content

Compilation Error in RedHat linux (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50) #13

Description

@priancho

Error messages are as follows,


creating Makefile
compiling export.cpp
In file included from /opt/services/nlp/local/include/simstring/memory_mapped_file.h:62:0,
from /opt/services/nlp/local/include/simstring/simstring.h:52,
from export.cpp:8:
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h: In member function ‘void memory_mapped_file_posix::open(const string&, std::ios_base::openmode)’:
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h:91:17: error: ‘::close’ has not been declared
::close(m_fd);
^
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h: In member function ‘void memory_mapped_file_posix::close()’:
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h:106:13: error: ‘::close’ has not been declared
::close(m_fd);
^
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h: In member function ‘bool memory_mapped_file_posix::resize(memory_mapped_file_posix::size_type)’:
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h:126:17: error: ‘::lseek’ has not been declared
if (::lseek(m_size, size, SEEK_SET) >= 0) {
^
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h:128:48: error: ‘read’ was not declared in this scope
if (read(m_fd, &c, sizeof(char)) == -1) {
^
/opt/services/nlp/local/include/simstring/memory_mapped_file_posix.h:131:49: error: ‘write’ was not declared in this scope
if (write(m_fd, &c, sizeof(char)) == -1) {
^
make: *** [export.o] Error 1


I changed export.cpp:8 line from
#include < simstring/simstring.h >
to
#include <../../include/simstring/simstring.h>.

And it works fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions