2

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

3
  • 1
    Do you mean to ask, "How do I statically compile my C project on [platform] so that others do not need to install the OpenCV library before using my application?" ? Commented Jan 18, 2012 at 23:35
  • well if that works yes but i thought there might be a way to convert the project into an exectutable file, no? Commented Jan 18, 2012 at 23:43
  • 2
    as sarnold noticed, your question too general without specifying platform and toolchain you are using. Please, provide this information. It will help us to try answer your question. Commented Jan 19, 2012 at 0:36

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments