opencv-rust icon indicating copy to clipboard operation
opencv-rust copied to clipboard

Just link necessary libraries

Open Jamyw7g opened this issue 3 years ago • 2 comments

Just need to link necessary libraries.

No matter what feature I use, it will link all libraries, but this is not necessary. And it slow down program startup.

Jamyw7g avatar Dec 30 '22 03:12 Jamyw7g

Hi, thanks for the PR! Unfortunately it's not that easy. OpenCV allows building in a configurations where there is only 1 dynamic library called opencv_world which contains the code for all enabled modules. But in your case, does specifying just OPENCV_LINK_LIBS environment variable not work? It should overwrite the list of libraries that would be linked. If it doesn't work maybe there is a bug in the build.rs.

twistedfall avatar Dec 30 '22 13:12 twistedfall

OPENCV_LINK_LIBS may not be convenient. features may be very straightforward and convenient. Maybe my implementation is not very well yet. I think you can consider it.

Jamyw7g avatar Dec 30 '22 14:12 Jamyw7g

I'm going to close this PR due to the reasons that this implementation won't work universally

twistedfall avatar Apr 16 '24 19:04 twistedfall