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

请问怎么编译demo下面的例子啊 #112

Open
Xiids opened this issue Dec 13, 2023 · 2 comments
Open

请问怎么编译demo下面的例子啊 #112

Xiids opened this issue Dec 13, 2023 · 2 comments

Comments

@Xiids
Copy link

Xiids commented Dec 13, 2023

xx@ubuntu:~/my_workspace/github/cpp-ipc-master/cpp-ipc-master/demo/chat/build$ cmake ..
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/local/bin/cc
-- Check for working C compiler: /usr/local/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.16)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/wangtao/my_workspace/github/cpp-ipc-master/cpp-ipc-master/demo/chat/build
wangtao@ubuntu:~/my_workspace/github/cpp-ipc-master/cpp-ipc-master/demo/chat/build$ cmake --build .
Scanning dependencies of target chat
[ 50%] Building CXX object CMakeFiles/chat.dir/main.o
/home/xx/my_workspace/github/cpp-ipc-master/cpp-ipc-master/demo/chat/main.cpp:8:10: fatal error: libipc/ipc.h: No such file or directory
8 | #include "libipc/ipc.h"
| ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/chat.dir/build.make:63: CMakeFiles/chat.dir/main.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/chat.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

谢谢

@mutouyun
Copy link
Owner

你应该在 cpp-ipc-master 文件夹下面建 build 文件夹,然后 cd 进去 cmake ..

@NEWPLAN
Copy link

NEWPLAN commented Dec 19, 2023

go to the build path of your repo, adding flags: LIBIPC_BUILD_DEMOS, i.e.,
mkdir build
cd build
cmake -DLIBIPC_BUILD_DEMOS=ON ..

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

3 participants