Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7744 Discussions

How do I statically link an openmp library using intel's icl.exe compiler on windows

us7name
Beginner
472 Views

Take the toy code

#include <stdlib.h>

#include "omp.h"

int main()
{
    #pragma omp parallel
    {}
    return EXIT_SUCCESS;
}

I would like to do something like:

icl.exe main.c /Qopenmp /Qopenmp-link=static /MT

This help page contains instructions for statically linking in Linux and Mac. But for windows it cryptically says "none". Does this mean static linking is impossible? Or does it mean some alternative procedure is necessary. What is that procedure?

Labels (1)
0 Kudos
4 Replies
SantoshY_Intel
Moderator
415 Views

Hi,


Thanks for reaching out to us.


We are working on your issue and we will get back to you soon.


Thanks & Regards,

Santosh


Viet_H_Intel
Moderator
397 Views

We don't have option to statically link an OpenMP as I think Microsoft doesn't support it neither.

I don't think it's possible because we don't have a static library to begin with.


Thanks,


Viet_H_Intel
Moderator
381 Views

Hi,


Please let us know if you have any other concerns. If not, we will plan to close this thread next week or so.


Thanks,

Viet


David_K_5
Novice
306 Views

I am also interested in having a C++ static library for OpenMP for Windows.

 

There is a static openmp library provided for MacOS and Linux in the current oneAPI distribution.

 

And, certainly Microsoft allows static library linking.

 

So, why does Intel not provide a static openmp library for Windows?

 

This is the real question from the original post.  So far, no one has given a technical answer as to why this is not possible.

 

And if there is no technical obstacle unique to Windows (which many people believe that there is not one), then Intel customers like myself would like to have such a static library for OpenMP.  (GPU-offload is not a concern to many developers who use OpenMP, so that should not be an inhibiting factor.)

 

 

Reply