ithewei / libhv

🔥 比libevent/libuv/asio更易用的网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket/MQTT client/server.
https://github.com/ithewei/libhv/wiki
BSD 3-Clause "New" or "Revised" License
6.69k stars 1.22k forks source link

Ubuntu 22.04 /usr/bin/ld: 找不到 -lstdc++: 没有那个文件或目录 #404

Closed J-Sai closed 1 year ago

J-Sai commented 1 year ago

./configure --with-openssl make 报错 cc base/hbase.o base/herr.o base/hlog.o base/hmain.o base/hsocket.o base/htime.o base/hversion.o base/rbtree.o ssl/appletls.o ssl/gnutls.o ssl/hssl.o ssl/mbedtls.o ssl/nossl.o ssl/openssl.o ssl/wintls.o event/epoll.o event/evport.o event/hevent.o event/hloop.o event/iocp.o event/kqueue.o event/nio.o event/nlog.o event/noevent.o event/overlapio.o event/poll.o event/rudp.o event/select.o event/unpack.o util/base64.o util/md5.o util/sha1.o cpputil/hasync.o cpputil/hdir.o cpputil/hpath.o cpputil/hstring.o cpputil/hurl.o cpputil/ifconfig.o cpputil/iniparser.o cpputil/RAII.o cpputil/ThreadLocalStorage.o http/httpdef.o http/http_parser.o http/multipart_parser.o http/websocket_parser.o http/wsdef.o http/Http1Parser.o http/Http2Parser.o http/http_content.o http/HttpMessage.o http/HttpParser.o http/WebSocketChannel.o http/WebSocketParser.o http/client/AsyncHttpClient.o http/client/HttpClient.o http/client/WebSocketClient.o http/server/FileCache.o http/server/HttpHandler.o http/server/HttpMiddleware.o http/server/http_page.o http/server/HttpServer.o http/server/HttpService.o examples/httpd/handler.o examples/httpd/httpd.o examples/httpd/router.o -o bin/httpd -lssl -lcrypto -Llib -L3rd/lib -L3rd/lib/x86_64-linux-gnu -lstdc++ -lpthread -lm -ldl -lrt /usr/bin/ld: 找不到 -lstdc++: 没有那个文件或目录 collect2: error: ld returned 1 exit status make[1]: *** [Makefile.in:271:httpd] 错误 1 cc examples/jsonrpc/jsonrpc_client.o examples/jsonrpc/cJSON.o base/hbase.o base/herr.o base/hlog.o base/hmain.o base/hsocket.o base/htime.o base/hversion.o base/rbtree.o ssl/appletls.o ssl/gnutls.o ssl/hssl.o ssl/mbedtls.o ssl/nossl.o ssl/openssl.o ssl/wintls.o event/epoll.o event/evport.o event/hevent.o event/hloop.o event/iocp.o event/kqueue.o event/nio.o event/nlog.o event/noevent.o event/overlapio.o event/poll.o event/rudp.o event/select.o event/unpack.o -o bin/jsonrpc_client -lssl -lcrypto -Llib -L3rd/lib -L3rd/lib/x86_64-linux-gnu -lstdc++ -lpthread -lm -ldl -lrt cc examples/jsonrpc/jsonrpc_server.o examples/jsonrpc/cJSON.o base/hbase.o base/herr.o base/hlog.o base/hmain.o base/hsocket.o base/htime.o base/hversion.o base/rbtree.o ssl/appletls.o ssl/gnutls.o ssl/hssl.o ssl/mbedtls.o ssl/nossl.o ssl/openssl.o ssl/wintls.o event/epoll.o event/evport.o event/hevent.o event/hloop.o event/iocp.o event/kqueue.o event/nio.o event/nlog.o event/noevent.o event/overlapio.o event/poll.o event/rudp.o event/select.o event/unpack.o -o bin/jsonrpc_server -lssl -lcrypto -Llib -L3rd/lib -L3rd/lib/x86_64-linux-gnu -lstdc++ -lpthread -lm -ldl -lrt /usr/bin/ld: 找不到 -lstdc++: 没有那个文件或目录

ithewei commented 1 year ago

兼容了下,如果不行的话可以使用cmake