Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error in macOS mojave 10.14.4 #17

Open
DinghaoLI opened this issue May 19, 2019 · 1 comment
Open

Compile error in macOS mojave 10.14.4 #17

DinghaoLI opened this issue May 19, 2019 · 1 comment

Comments

@DinghaoLI
Copy link

DinghaoLI commented May 19, 2019

编译器版本:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

报错信息:

/Users/dinghaoli/Desktop/Playground/WebServer/WebServer/base/FileUtil.cpp:51:12: error: use of undeclared identifier 'fwrite_unlocked' return fwrite_unlocked(logline, 1, len, fp_); ^ 1 error generated. make[2]: *** [WebServer/base/CMakeFiles/libserver_base.dir/FileUtil.cpp.o] Error 1 make[1]: *** [WebServer/base/CMakeFiles/libserver_base.dir/all] Error 2 make: *** [all] Error 2

@linyacool
Copy link
Owner

我没在macos上跑过,macos上可能没有fwrite_unlocked这个接口吧,你换成fwrite试试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants