sxtwl_cpp icon indicating copy to clipboard operation
sxtwl_cpp copied to clipboard

linux平台下编译 example 报错

Open liyuecheng opened this issue 1 year ago • 0 comments

[ 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

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

liyuecheng avatar May 30 '24 06:05 liyuecheng