# Error :- CV\_RETR\_EXTERNAL :- was not declared in the scope

**URL:** <https://forum.opencv.org/t/error-cv-retr-external-was-not-declared-in-the-scope/7152>\
**Category:** C++\
**Created:** [January 16, 2022, 3:31pm UTC](https://forum.opencv.org/t/error-cv-retr-external-was-not-declared-in-the-scope/7152 "2022-01-16T15:31:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvjohn100](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/mvjohn100/32/3919_2.png) [@mvjohn100](https://forum.opencv.org/u/mvjohn100)\
**Post date:** [January 16, 2022, 3:31pm UTC](https://forum.opencv.org/t/error-cv-retr-external-was-not-declared-in-the-scope/7152/1 "2022-01-16T15:31:12Z")

</div>

cv::findContours(bw.clone(), contours, CV\_RETR\_EXTERNAL, CV\_CHAIN\_APPROX\_SIMPLE); how to solve not declared in the scope error for CV\_RETR\_EXTERNAL, and CV\_CHAIN\_APPROX\_SIMPLE

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [January 16, 2022, 3:43pm UTC](https://forum.opencv.org/t/error-cv-retr-external-was-not-declared-in-the-scope/7152/2 "2022-01-16T15:43:48Z")

</div>

you’re looking at outdated samples /[documentation](https://docs.opencv.org/4.x/d3/dc0/group __imgproc__ shape.html#gga819779b9857cc2f8601e6526a3a5bc71aa7adc6d6608609fd84650f71b954b981)

all those `CV_` prefixes were dropped with 3.0 already
