Skip to content

linux平台下编译 example 报错 #40

Description

@liyuecheng

[ 88%] Building CXX object example/CMakeFiles/example.dir/main.cpp.o
/root/sxtwl_cpp/example/main.cpp: In function 'int main()':
/root/sxtwl_cpp/example/main.cpp:96:2: error: 'MBuf' was not declared in this scope
96 | MBuf buf;
| ^~~~

在 example/main.cpp 里面把WIN32的宏注释掉就行了
#ifdef _WIN32
class MBuf : public std::stringbuf
...
#endif

虽然是小问题,但不熟悉的小白可能要摸很久,进而对群主的专业性产生怀疑(狗头)。

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions