# How to build an opencv function into a dll for calling in E Language

**URL:** <https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095>\
**Category:** Uncategorized\
**Tags:** programming\
**Created:** [October 4, 2025, 5:01am UTC](https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095 "2025-10-04T05:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cxnet](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cxnet](https://forum.opencv.org/u/cxnet)\
**Post date:** [October 4, 2025, 5:01am UTC](https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095/1 "2025-10-04T05:01:53Z")

</div>

Hello everyone, I want to build the imread, imshow,dilate and other functions of Opencv into DLLS for E language to call. But what data type should the Mat data after imread reads the image be? Can the subsequent functions such as imshow and dilate be used in E language programs? If possible, please help me write a sample code. Thank you!

---

<div class="post-metadata">

**Author:** ![Jay\_Pol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/jay_pol/32/13796_2.png) [@Jay\_Pol](https://forum.opencv.org/u/Jay_Pol)\
**Post date:** [October 5, 2025, 11:03am UTC](https://forum.opencv.org/t/how-to-build-an-opencv-function-into-a-dll-for-calling-in-e-language/24095/2 "2025-10-05T11:03:53Z")

</div>

According to me you can’t pass Mat directly to E language. Instead of that I think you should wrap your OpenCV calls in exported C- style function inside the DLL.
