Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Albert_P_
Beginner
299 Views

Import run-time dlls into exe file

Jump to solution

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
299 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

11 Replies
SergeyKostrov
Valued Contributor II
299 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" ) ...
Albert_P_
Beginner
299 Views
Thank you for reply, but there is no that libs. Where can I find it?
Albert_P_
Beginner
299 Views
I guess, It's impossible to find that libs (see the attach.)
Milind_Kulkarni__Int
New Contributor II
299 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.
JenniferJ
Moderator
300 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

Albert_P_
Beginner
299 Views
Thank you very much!
SergeyKostrov
Valued Contributor II
299 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.
SergeyKostrov
Valued Contributor II
299 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.
Albert_P_
Beginner
299 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
SergeyKostrov
Valued Contributor II
299 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
Albert_P_
Beginner
299 Views
Thank you Sergey for help!
Reply