Skip to content
This repository was archived by the owner on Sep 1, 2019. It is now read-only.
This repository was archived by the owner on Sep 1, 2019. It is now read-only.

RHEL7 环境,编译出错,缺少了include 对应的头文件 #1

@samuelyao314

Description

@samuelyao314

RHEL7 环境,编译出错,缺少了include 对应的标准头文件

/home/samuel/install/zutils/zutils/base2/byte_stream.cc: In member function ‘virtual void* base::ByteStream::Alloc(uint32)’:
/home/samuel/install/zutils/zutils/base2/byte_stream.cc:49:61: error: ‘malloc’ was not declared in this scope
if (buffer_ == 0) buffer_ = (char *)malloc(new_buffer_size);
^
/home/samuel/install/zutils/zutils/base2/byte_stream.cc:50:58: error: ‘realloc’ was not declared in this scope
else buffer_ = (char *)realloc(buffer_, new_buffer_size);
^
/home/samuel/install/zutils/zutils/base2/byte_stream.cc: In member function ‘virtual void base::ByteStream::Free()’:
/home/samuel/install/zutils/zutils/base2/byte_stream.cc:63:15: error: ‘free’ was not declared in this scope
free(buffer_);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions