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

STLPort 5.0.2 with ICL 9.0 on Windows

bobh999
Beginner
427 Views
My question is related to dynamic linking of the C runtime library. The back end I am using is MSVC 6 SP5. The Intel compiler supplies some libraries which appear to be CRT libs (libmm.dll, etc.). However, I thought that the MSVC librarieswere used. Does this mean that Intel uses its own CRT libraries? I couldn't find anything much about these Intel libs in the help file, only that they are there. How do these interact with the MSVC libraries?
I would like to statically link my applications and DLLs with the STLPort C++ libraries and link everything dynamically to MSVCRT.DLL. Is this possible? I don't want to have to distribute any 3rd party DLLs as part of my applications.
Thank you.
0 Kudos
5 Replies
TimP
Honored Contributor III
427 Views
ICL preempts only a small part of MSVC run-time library. I think your question is about linking statically against all Intel compiler libraries, while linking dynamically against MSVCRT. Option -i-static, or, if not using the OpenMP library, -static-libcxa, should do it. You could use dumpbin /dependencies (IIRC) to verify that you have accomplished what you wish.
0 Kudos
bobh999
Beginner
427 Views

Thanks, Tim.

I think that would probably do it, although I still need tobuild and run the STLPort unit tests to ensure that everything works OK.

Apparently, libmmd.dll only preemts some (or a lot of!) of the math functions. My main worries are more concerning memory allocation and deallocation.

0 Kudos
bobh999
Beginner
427 Views

"Option -i-static, or, if not using the OpenMP library, -static-libcxa, should do it."

Isn't libcxa for Linux?

After going through the help file again, it appears that there is a file libmmds.lib which is the "Static math library built with /MD option".

Should I becompiling with"-static-libmmds" on Windows IA32, or how do I link to that file and not to libmmd.libwith /MD?

0 Kudos
TimP
Honored Contributor III
427 Views
Bob,

Sorry about my linux orientation. I can only point out that you could name any static .lib you want explicitly, to force it to be used in place of the dynamic one.
0 Kudos
bobh999
Beginner
427 Views

Unfortunately, the Windows version of ICL doesn't seem to like any of the options you suggested (Warning: ignoring unknown command-line option ...[etc.])

But I can link everything separately and specify the libraries, it's just a lot more work that way.

0 Kudos
Reply