I made a couple of minor changes to your code to make it compile under Windows. It works great! I am new to the forking process, so I will just write them out here.
The changes are all to the RMControl.cpp, I have included line numbers:
Commented out the two files below since they do not exist under Windows. There is no need to include Winsock instead.
35 // #include <netinet/in.h>
36 // #include <arpa/inet.h>
I added the (const char *) in front of rd_msg_1s above. I believe under Windows the MC++ expects to be pointed to the contents of the variable. There were 25 instances of this, most of the sendto constructs.
I made a couple of minor changes to your code to make it compile under Windows. It works great! I am new to the forking process, so I will just write them out here.
The changes are all to the RMControl.cpp, I have included line numbers:
Commented out the two files below since they do not exist under Windows. There is no need to include Winsock instead. 35 // #include <netinet/in.h> 36 // #include <arpa/inet.h>
1109 Sleep(10); // as usleep is Unix only
1160 sendto(m_dataSocket, (const char )rd_msg_1s, sizeof(rd_msg_1s), 0, (struct sockaddr)&m_radar_addr, sizeof(m_radar_addr));
I added the (const char *) in front of rd_msg_1s above. I believe under Windows the MC++ expects to be pointed to the contents of the variable. There were 25 instances of this, most of the sendto constructs.
That is it.