Muduo库使用
头文件与库文件设置:
//gcc C_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/angelorlover/build/release-install-cpp11/include export C_INCLUDE_PATH //g++ CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/angelorlover/build/release-install-cpp11/include export CPLUS_INCLUDE_PATH //动态库 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/angelorlover/build/release-install-cpp11/lib export LD_LIBRARY_PATH //静态库 LIBRARY_PATH=$LIBRARY_PATH:/home/angelorlover/build/release-install-cpp11/lib export LIBRARY_PATH
编译与链接
//编译 gcc -c echo.cc gcc -c main.cc //链接 g++ -g -o echo echo.cc main.cc -lmuduo_base -lmuduo_net -lpthread
预处理
gcc -E main.c > main.i
编译
gcc -S main.i -o main.s
汇编
gcc -c main.s -o main.o
链接
gcc main.o -o main