-
Notifications
You must be signed in to change notification settings - Fork 417
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
/yolanda/chap-5/lib/common.h:8:20: error: config.h: No such file or directory #25
Comments
还有另外一个错误,好像缺少一个文件 #include <aio.h> CMakeFiles/aio01.dir/aio01.c.o: In function |
大哥,你的aio.h解决了吗?我也遇到同一个问题,老师可以帮忙看看吗? |
你们是什么环境? |
谢谢老师答复,我是Deepin 15.11 + Kernel 5.6,应该可以当Ubuntu对待。还在研究是link的library有问题,还是未安装aio.h成功。 |
https://stackoverflow.com/questions/1217705/compiling-c-program-with-posix-aio-lib-on-linux |
编译的时候加-lrt, 可以解决你的问题么? |
bowen@bowen-PC:~/code/yolanda/chap-30$ gcc -lrt ../lib aio01.c -o aio 尝试直接用gcc编译,但是不知道怎么一起编译lib,找不到lib/common.h. 不如老师把-lrt写在make里?然后我再试试? |
gcc -lrt ../lib/* aio01.c -o aio 又报找不到config的错。 |
aio可能比较特殊,暂时可以把它注释掉再试试 |
@BowenXiao1999 @chazex /chap-30/CMakeList.txt 的最后一行改为 |
Thanks. LGTM. |
同学,这个你是如何解决的啊?感谢 |
请问将CMakeList.txt 的最后一行改为 target_link_libraries(aio01 yolanda rt)后make时候成功了,但是运行时发现没有lib/common.h文件,这个问题应该如何解决的? |
老师你好:
cmake的时候遇到了这个问题,是什么原因呢,没找到config.h的代码呢。
/yolanda/chap-5/lib/common.h:8:20: error: config.h: No such file or directory
如果我把config.h注释掉,又有如下错误:
[ 50%] Linking C executable tcpserver
/usr/bin/ld: cannot find -lyolanda
yolanda 找不到这个个库
The text was updated successfully, but these errors were encountered: