Import run-time dlls into exe file

Import run-time dlls into exe file

Hello!

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

How can I include it?

Thank you.

publicaciones de 12 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

>>...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" )
...

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

I guess, It's impossible to find that libs (see the attach.)

Adjuntos: 

AdjuntoTamaño
Descargar 110.jpg54.11 KB

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.

Imagen de Jennifer J. (Intel)
Best Reply

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

Thank you very much!

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

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

Cita:

Sergey Kostrov escribió:

>>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.
Cita:

1>icl : warning #10121: overriding '/MD' with '/MT'
- but anyway lib is included

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

Thank you Sergey for help!

Inicie sesión para dejar un comentario.