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

Compile error using socket.h which installed by CMake. #27

Open
aYasuharuYamada opened this issue Jul 1, 2022 · 0 comments
Open

Compile error using socket.h which installed by CMake. #27

aYasuharuYamada opened this issue Jul 1, 2022 · 0 comments

Comments

@aYasuharuYamada
Copy link

Hi,
I installed nanomsgxx using CMake, and then I compile a file which include nnxx/socket.h but compile error happens.

/usr/include/nnxx/socket.h:232:10: fatal error: 'nnxx/socket.hpp' file not found
#include <nnxx/socket.hpp>
         ^~~~~~~~~~~~~~~~~
1 error generated.

The reason is make install command by CMake does not install socket.hpp.
In my check, there are other files not installed, ex: *.hpp, message, etc.

Fix patch is following:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a734018..c42654b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -34,27 +34,33 @@ set(NNXX_SRCS   ./nnxx/error.cpp
                 ./nnxx/tcp.cpp
                 ./nnxx/timeout.cpp)

-set(NNXX_HDRS   ./nanomsg/ext/nnxx_ext.h
-                ./nnxx/bus.h
+set(NNXX_HDRS   ./nnxx/bus.h
                 ./nnxx/chrono.h
                 ./nnxx/error.h
                 ./nnxx/inproc.h
                 ./nnxx/ipc.h
+                ./nnxx/message
                 ./nnxx/message.h
                 ./nnxx/message_control.h
                 ./nnxx/message_istream.h
+                ./nnxx/message_istream.hpp
                 ./nnxx/message_iterator.h
                 ./nnxx/message_ostream.h
+                ./nnxx/message_ostream.hpp
                 ./nnxx/message_streambuf.h
+                ./nnxx/message_streambuf.hpp
                 ./nnxx/nn.h
                 ./nnxx/pair.h
                 ./nnxx/pipeline.h
                 ./nnxx/poll.h
                 ./nnxx/pubsub.h
                 ./nnxx/reqrep.h
+                ./nnxx/socket
                 ./nnxx/socket.h
+                ./nnxx/socket.hpp
                 ./nnxx/survey.h
                 ./nnxx/tcp.h
+                ./nnxx/testing
                 ./nnxx/timeout.h
                 ./nnxx/unittest.h)
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

1 participant