2

ビルド/コンパイルすると、次のエラーが発生します。

C:\Ethe\main.cpp: In function 'int main()':
C:\Ethe\main.cpp:11:4: error: 'zmq' has not been declared
C:\Ethe\main.cpp:11:19: error: expected ';' before 'context'
C:\Ethe\main.cpp:12:4: error: 'zmq' has not been declared
C:\Ethe\main.cpp:12:18: error: expected ';' before 'socket'
C:\Ethe\main.cpp:14:4: error: 'zmq' has not been declared

main.cpp:

#include <zmq.h>
#include <iostream>
#include <string>

int main()
{
   std::string tip;
   std::cout << "Enter Target IP: ";
   std::cin >> tip;

   zmq::context_t context (1);
   zmq::socket_t socket (context, ZMQ_REQ);
   std::cout << "Connecting to " << tip << std::endl;
   zmq::socket.connect ("tcp://"+tip+":5555");

   return 0;
}

これを修正する方法について何かアイデアはありますか?

4

2 に答える 2