SEAL icon indicating copy to clipboard operation
SEAL copied to clipboard

connecting Microsoft SEAL with socket programming

Open RachaElmo opened this issue 4 years ago • 7 comments

Hello I am writing a code for my client-server model. I created a server and I used the header WS2tcpip.h in my code and it runs normally. Then I connected SEAL to a project that runs normally. Also I added the file server.cpp to the project that is connected to SEAL. However once I write this =>using namespace seal;
my code stops running and keeps giving 100 errors. Any suggestions please? does SEAl even work with winsock libraries like ws2_32 with header WS2tcpip2.h or winsock2 with header winsock2.h?

RachaElmo avatar Apr 22 '20 09:04 RachaElmo

It should work fine, so I suspect something else is wrong. Maybe the header files are not correctly included? Did you add native/src to your project in the include directories?

kimlaine avatar Apr 22 '20 22:04 kimlaine

nativesrc

I included SEAL paths in C/C++ -> Additonal include directories , and in Linker ->General->Additional library directories, also added seal.lib and ws2_32.lib in Linker -> Input - >Additional dependencies. I get errors like this errs

RachaElmo avatar Apr 23 '20 02:04 RachaElmo

It sounds like you did everything correctly. Would it be possible to share the project?

kimlaine avatar Apr 23 '20 07:04 kimlaine

It sounds like you did everything correctly. Would it be possible to share the project? sorry I recently saw this reply. I shared the .cpp and .h files for my project.

Server(1).zip

please can you check it out.

RachaElmo avatar May 08 '20 16:05 RachaElmo

Is there a reason why you commented out the SEAL header file from your includes? Maybe that's the only reason it doesn't work?

kimlaine avatar May 15 '20 03:05 kimlaine

Actually my problem is when I uncomment them I get errors. For example this sample code below gives errors when I run it on a project connected to SEAL:

#include #include <WS2tcpip.h> #include "seal/seal.h" #pragma comment (lib, "ws2_32.lib")

using namespace std; using namespace seal;

void server() {

string s;

} int main() { server();

}

RachaElmo avatar May 15 '20 18:05 RachaElmo

the first line is adding "iostream" library of c++ but when i post my comment it goes away.

RachaElmo avatar May 15 '20 18:05 RachaElmo