lbennet
lbennet

Reputation: 1103

How to compile c for opencv, not c++

I've seen here on stack how to compile C++ for opencv but not regular C. I have a .c file that I created written in c and can't find a source online that explains how to compile this c file.

Thanks

Upvotes: 0

Views: 485

Answers (1)

Scony
Scony

Reputation: 4138

gcc file.c -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv\
_contrib -lopencv_legacy -lopencv_flann -lm

Such amount of libs can be reduced depending what do you need.

Upvotes: 1

Related Questions