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

Import run-time dlls into exe file

Albert_P_
Beginner
1,323 Views

Hello!

I need include run-time dlls (MSVCR110.dll, libmmd.dll, etc) into exe file.

How can I include it?

Thank you.

0 Kudos
1 Solution
JenniferJ
Moderator
1,323 Views
The libmmd.dll is the dll version of the math lib. The static lib version is the libmmt.lib. The MSVCR110.dll 's static lib is msvcrt.lib. To link both static .lib files, use /MT compile option. To be certain, add "libmmt.lib" to the link option as well. I don't remember if the "libmmt.lib" will be linked automatically when /MT is specified. Jennifer

View solution in original post

0 Kudos
11 Replies
SergeyKostrov
Valued Contributor II
1,323 Views
>>...I need include run-time dlls (MSVCR110.dll, libmmd.dll, etc) into exe file. >>How can I include it? Many DLLs have import libraries ( look in ..\VC\Lib folder ) and in your case you should look for: MSVCR110.dll -> MSVCR110.lib libmmd.dll -> libmmd..lib There are several ways and two most common are as follows: - In a VS project settings ( Linker section / Additiomal dependencies or libraries ) or - In source codes ( in cpp- or h-files ), like: ... #pragma comment ( lib, "MSVCR110.lib" ) #pragma comment ( lib, "libmmd..lib" ) ...
0 Kudos
Albert_P_
Beginner
1,323 Views
Thank you for reply, but there is no that libs. Where can I find it?
0 Kudos
Albert_P_
Beginner
1,323 Views
I guess, It's impossible to find that libs (see the attach.)
0 Kudos
Milind_Kulkarni__Int
New Contributor II
1,323 Views
take a look at C Runtime libraries of VS2012. as always for all visual studio, the import library for MSVCRT110.dll is again msvcrt.lib (same name for any other visual studio). So you can import that. the rest is okay. but i think MSVCRT110.dll should be present in your target/host system, being the dll version linking. I think you should also be able to do well building the project with /MD option, which I think should be default for EXE/dll. also, libmmd.dll, MSVCRT110.dll both can be redistributed. in some case, you will also likely have to add additional libraries to the Linker -> Input under Additional Dependencies. I think you should not try to mix /MT & /MD in a single application. let us know if still you face any problem.
0 Kudos
JenniferJ
Moderator
1,324 Views
The libmmd.dll is the dll version of the math lib. The static lib version is the libmmt.lib. The MSVCR110.dll 's static lib is msvcrt.lib. To link both static .lib files, use /MT compile option. To be certain, add "libmmt.lib" to the link option as well. I don't remember if the "libmmt.lib" will be linked automatically when /MT is specified. Jennifer
0 Kudos
Albert_P_
Beginner
1,323 Views
Thank you very much!
0 Kudos
SergeyKostrov
Valued Contributor II
1,323 Views
>>Thank you for reply, but there is no that libs. Where can I find it? Here are a couple of questions: - Why do you need these two libraries? - Did you have some linker errors? - Could you explain what set of CRT-functions you are going to use / or using? Please provide some technical details. Thanks in advance.
0 Kudos
SergeyKostrov
Valued Contributor II
1,323 Views
>>...take a look at C Runtime libraries of VS2012. as always for all visual studio, the import library for MSVCRT110.dll is again msvcrt.lib... It is not clear what VS version / edition 'Albert P' is using. Actually, I've never included any MSVCRT*.lib libraries directly because VS project wizards do the job.
0 Kudos
Albert_P_
Beginner
1,323 Views
Sergey Kostrov wrote:

>>Thank you for reply, but there is no that libs. Where can I find it?

Here are a couple of questions:

- Why do you need these two libraries?
- Did you have some linker errors?
- Could you explain what set of CRT-functions you are going to use / or using?

Please provide some technical details. Thanks in advance.

2 libs for 2 programs.
1>icl : warning #10121: overriding '/MD' with '/MT'
- but anyway lib is included
0 Kudos
SergeyKostrov
Valued Contributor II
1,323 Views
I'd like to make a follow up: >>...Actually, I've never included any MSVCRT*.lib libraries directly because VS project wizards do the job... In case you need to use msvcrt* import libraries please take into account that: - 'msvcrt.lib' is for Release configurations - 'msvcrtd.lib' is for Debug configurations
0 Kudos
Albert_P_
Beginner
1,323 Views
Thank you Sergey for help!
0 Kudos
Reply