Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Building static library for wsServer for Intel Phi on windows

MWind2
New Contributor III
523 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
491 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.

0 Kudos
MWind2
New Contributor III
481 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

 

 

0 Kudos
Reply