Missing solutions for static LIB (Feature #3813)


Added by Robby Longhorn over 10 years ago. Updated over 10 years ago.


Status:Cancelled Start date:2014-07-16
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Difficulty: Pull request:

Description

When CMake creates the projects for Visual Studio it creates a configuration for Release and one for Debug.

But both are configured to create all output files only as DLL's.
In most cases it is not handy to deliver a bunch of DLL's with the application.
And as OpenCV depends on many compiler settings (built with libpng or not, built with OCL or not, built with GPU or not, etc) these DLL's cannot be interchanged with other applications. So the dream to put the OpenCV DLL's into a common folder is an unrealistic dream.

Each application requires its own DLL's that have been built with the settings that the application needs.

So it is much more intelligent to compile OpenCV as a static LIB file which results in less megabyte because the compiler includes only the code that is really in use and does not export EVERYTHING like in a DLL.

But the problem is that there is currently no configuration to build OpenCV as static Library.

I suggest that there should be 4 default configurations:

1.) Debug_DLL
2.) Release_DLL
3.) Debug_LIB
4.) Release_LIB

In the settings it is required that the DLL uses the switch CVAPI_EXPORTS while the LIB must not.

When you build OpenCV without CVAPI_EXPORTS you will notice that there is something wrong in the OCL project which throws a lot of errors. I did not further investigate that because I don't use it.


Associated revisions

Revision 559dfa29
Added by Vadim Pisarevsky almost 10 years ago

Merge pull request #3813 from hahne:iss1915

History

Updated by Steven Puttemans over 10 years ago

You must be doing something wrong here. I have built openCV myself on W7 for ages now and the lib and so are the dll files are always provided.
This enables me to statically link everything.

Can you please provide your CMAKE output?

  • Status changed from New to Incomplete

Updated by Steven Puttemans over 10 years ago

Since no response is comming I am cancelling this one. Reopen if you still think this is a bug.

  • Status changed from Incomplete to Cancelled

Also available in: Atom PDF