user992520
user992520

Reputation:

How to statically compile my opencv c project to a single executable

As the title describes, I have a project in C using opencv.

How do I statically compile this to a single executable that I can transfer to other PCs and it will work?

The platform i am using is Windows. Programming in visual studio

Upvotes: 2

Views: 2258

Answers (1)

Martin Beckett
Martin Beckett

Reputation: 96177

You can build openCV as static libs with the cmake option -DBUILD_SHARED_LIBS=OFF, how you link against these libs in your program depends on your OS

Detailed instructions for windows

Upvotes: 2

Related Questions