Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
7763 Discussions

Building static library for wsServer for Intel Phi on windows

MWind2
New Contributor III
304 Views

I was trying to build from

 GitHub - Theldus/wsServer: wsServer - a tiny WebSocket server library written in C 

on Windows with Intel 2017 Cluster for a Phi 1 board use, but I get errors trying to make static "libws.a". The makefile uses ar, nd I don't know how to duplicate in the -Qmic needed on building in Windows with icl. So far I have copied all the files into one directory and can build

icl -Qmic -g -fPIC -shared -ID:\phi\vs17\wss\flat ws.c utf8.c sha1.c handshake.c base64.c -o libws.micdso

and 

icl -Qmic  -fPIC -shared -ID:\phi\vs17\wss\flat ws.c utf8.c sha1.c handshake.c base64.c -o libws.micso.

When I try with -static and pthread I get error for reference to main. What would be a good command line to build static library?

0 Kudos
2 Replies
MWind2
New Contributor III
272 Views

Maybe I should change to[ic to "... on Linux" as I have given up on Windows and have now a dev environment for Linux up.

But I don't see a way to use xiar or xild to make static lib for native Phi, only offload.

MWind2
New Contributor III
262 Views

This works:

icc -mmic -I ./ -c *.c
xiar rc libws.a ws.o utf8.o sha1.o base64.o handshake.o
icc -mmic -I ./ ws0.c libws.a -lpthread -o ws0.mic

 

 

Reply