/Mt and /clr not compatible

故事扮演 提交于 2019-12-11 00:37:35

问题


I have been using EIGEN to solve systems of equation. the only way I was successful to compile my code is by using /CLR. When I try to build my project.I noticed that in order for my exe to work on other pc, I need to build it using /MT (not DLL). problem they are not compatible. if I remove /CLR, my project wont compile, and if I leave the DLL, my exe works on other pc but gives unrealistic value.

Can someone advise on what to do. This is my first program I write. I am a mechanical engineer solving equation, please bear with me.

Ok I just search in the web, but I found that I can not build a windows form application without /CLR.

I am not sure if my target machine will have redistributed vc. is there any way to have my exe along with some dll instead? I often see this with small programs.


回答1:


You need to link to the dynamic runtime, /MD. The problem you have is that the other machine doesn't have that runtime installed. Solve that by simply installing, on each machine where you need to run the program, the redistributable package for your version of Visual Studio.



来源:https://stackoverflow.com/questions/15386749/mt-and-clr-not-compatible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!