James
James

Reputation: 1852

Microsoft runtime libraries

We're writing an MFC program for a client and gave them and executable but it turns out that they need to install a runtime. I haven't time to learn how to create an installer, so I was going to try and change the Code Generation/ Run time library to /MT and take the hit on the size of the program but now I get this error,

fatal error C1189: #error :  Please use the /MD switch for _AFXDLL builds

I'm using visual studio 2010. I just want to be able to give the code (small executable) to the client and it run.

BTW, if anyone can point me in the direction of a good article on how the build an installer, I would be very grateful.

Thanks, James

Upvotes: 0

Views: 216

Answers (2)

RobH
RobH

Reputation: 1639

Here is an article on redistributing the Visual C++ files that your client needs to run your application. Probably, the easiest option would be to get the installer from here for the 32-bit version or here for the 64-bit version. Alternatively, you if you are going to write an installer, you can use the merge modules, which should have been included with your Visual Studio.

Upvotes: 0

Mark Taylor
Mark Taylor

Reputation: 1851

The /MT applies to the C Runtime Library. You also need to deal with the MFC library. Configuration Properties - General - Use MFC in a Static Library.

Upvotes: 2

Related Questions