Api win32. Problem solved with MSVCR90D.dll and MSVCR90.dll

Hello friends,
sometimes I need light applications which, say, must start at windows startup. In thees cases I recur to the win32 apis . But, with Visual c++ 2008 I encountered a difficulty which appeared to be very hard to resolve: when I launched an api win32 application on a machine without Visual c++ 2008, the application showed error and I was requested of MSVCR90D.dll e MSVCR90.dll. Finally I solved the issue this way:
In release mode:
1)Project menu>Project properties>(if you don't see tree menu scroll toward left)Linker>Link Library Dependencies>No
2)Project menu>Project properties>C/C++>Code Generation>Runtime Library>Multithread (/MT). (This way ). This setting results a very light executable working in all machines
You have to work always in release mode, because the application in release mode may crash whereas in debug mode it compiles.
Rarely may occur that, in release mode, the application compiles but crashes without
noticing any error. In this case switch to debug mode and you will have more information about the errors. After the debug, switch over again to release mode.
Goodbye!

1 comment

  1. Fixed by 2)Project menu>Project properties>C/C++>Code Generation>Runtime Library>Multi-threaded (/MTd)
    to 2)Project menu>Project properties>C/C++>Code Generation>Runtime Library>Multi-threaded Debug (/MT)

    ReplyDelete