Itseez/opencv — pull request #39 by kazuki-ma (2012-10-11 15:06:37+00:00)
Title: Auto library linking pragma for VisualStudio.

In Visual Studio, there are

#pragma comment(lib, "XXX")

syntax to specify a library file for Linker.
Writing a #pragma in your c/c++ source code or header file,
the linkage-editor recognize it and links the library file.
When users use the syntax, users no longer care about linker options such as

"add opencv_highgui242d.lib, opencv_core242d.lib .... ouch I forget imgproc.
I also have to specify almost the same options in Release build Settings
............I think it is 100th settings in my life :-< ",

I hope that OpenCV use its useful syntax.

For same time back, Boost C++ library is using its technique, and
user who use the library in Visual Studio
can use the library without specifying library files manually.
Thanks to the pragma, we use Boost, there are no linker errors without side effects when.

It's like a .pc files of pkg-config in Unix/Linux environment.

I think there are no reason we don't use this syntax in Windows
because OpenCV on Linux/Mac now using similar technique which is called pkg-config.

Thanks.