Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

Static link, intel CRT

gokhan_ufl
Beginner
152 Views
I am compiling a C code using the intel compiler. I integrated icc with visual studio 2010. I want to generate an optimized executable which will run on a windows machine. It is actually a virtual machine in the cloud. I don't have a chance to install any redistributable library to the target machine. I want to statically link all the required libraries. How can I do this?
0 Kudos
2 Replies
Om_S_Intel
Employee
152 Views
You need to compile using /ML or /MT compiler option.

It would be better to link using dynamic libraries if you are compiling multithreaded application.
TimP
Black Belt
152 Views
The recommendation about dynamic libraries applies primarily to threading run-time (like libiomp5), when you have multiple stages of linking (as when you make a .dll). In that case, the dynamic library choice avoids mistakes such as linking in multiple copies of threading library.
Reply