Ask Your Question
0

Visual Studio CLR static and dinamic libs

asked 2017-05-15 18:24:02 -0600

Fynjy8 gravatar image

I use VS2017 and OpenCV 3.2.0 So, I want to run my OpenCV app on another computer, so I built OpenCV with static libs, changed flag to /MT and it's work on any x64 computers (without OpenCV). But then, I decided create windows forms, and in the latest versions VS it's possible only with CLR, and the problem is: CLR don't work with /MT, only with dinamic libs (/Md).

What I can do with it? Don't use windows forms at all? Or I can add dinamic libs with exe in one folder and it'll work on another comp? (I tried to copy libs, but it didn't help, it want .dll, not .lib, maybe I need to build dll in some way?)

P.S. Sorry for my english, I hope you understand what I want to say)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-15 19:09:20 -0600

Tetragramm gravatar image

You can use the dynamic libraries so long as the .dll files are on the DLL Search Path of the .exe

HERE is a page explaining how the search works. So putting the .dll files in the same folder as your .exe will work all the time. Putting them in a different folder will work if you either add it to the path, or the application calls the SetDllDirectory function mentioned in that article.

Hope this helps.

edit flag offensive delete link more

Comments

yes, it works with DLL in the same folder, thank you!

Fynjy8 gravatar imageFynjy8 ( 2017-05-26 18:04:50 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-05-15 18:18:32 -0600

Seen: 254 times

Last updated: May 15 '17