xukc commited on
Commit
1a0b523
·
1 Parent(s): a5c604e

[fix]编译错误

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. include/conn_map.h +1 -0
Dockerfile CHANGED
@@ -10,14 +10,14 @@ RUN apt-get update
10
  # Install build tools
11
  RUN apt-get install -y g++ make cmake autoconf automake libtool
12
 
13
- # Download and build libuv from source
14
  RUN apt-get install -y git
15
  RUN git clone https://github.com/ithewei/libhv.git /usr/src/libhv
16
  WORKDIR /usr/src/libhv
17
  RUN make
18
  RUN make install
19
 
20
- # Add the libuv library path
21
  RUN ldconfig
22
 
23
  # Set the working directory to /app
@@ -27,7 +27,7 @@ WORKDIR /app
27
  COPY . .
28
 
29
  # Compile the C++ program
30
- RUN g++ -std=c++14 -g -o proxyServer hv_utils.cpp tcp_inbound.cpp main.cpp -I include -lhv
31
 
32
  EXPOSE 8080
33
  # Run my_program when the container launches
 
10
  # Install build tools
11
  RUN apt-get install -y g++ make cmake autoconf automake libtool
12
 
13
+ # Download and build libhv from source
14
  RUN apt-get install -y git
15
  RUN git clone https://github.com/ithewei/libhv.git /usr/src/libhv
16
  WORKDIR /usr/src/libhv
17
  RUN make
18
  RUN make install
19
 
20
+ # Add the libhv library path
21
  RUN ldconfig
22
 
23
  # Set the working directory to /app
 
27
  COPY . .
28
 
29
  # Compile the C++ program
30
+ RUN g++ -std=c++14 -g -o proxyServer hv_utils.cpp tcp_inbound.cpp main.cpp -I include -I include/bolt -lhv
31
 
32
  EXPOSE 8080
33
  # Run my_program when the container launches
include/conn_map.h CHANGED
@@ -4,6 +4,7 @@
4
  #include <iostream>
5
  #include <map>
6
  #include <shared_mutex>
 
7
 
8
  template <typename Key, typename Value>
9
  class ConnMap {
 
4
  #include <iostream>
5
  #include <map>
6
  #include <shared_mutex>
7
+ #include <mutex>
8
 
9
  template <typename Key, typename Value>
10
  class ConnMap {