# How to set up OpenCV with qt on c++ with dll in Visual Stdio

**URL:** https://forum.opencv.org/t/how-to-set-up-opencv-with-qt-on-c-with-dll-in-visual-stdio/8259
**Category:** C++
**Tags:** build
**Created:** [April 5, 2022, 5:40am UTC](https://forum.opencv.org/t/how-to-set-up-opencv-with-qt-on-c-with-dll-in-visual-stdio/8259 "2022-04-05T05:40:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Chuckie\_Zhu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chuckie_zhu/32/4928_2.png) [@Chuckie\_Zhu](https://forum.opencv.org/u/Chuckie_Zhu)
#### Post date: [April 5, 2022, 5:40am UTC](https://forum.opencv.org/t/how-to-set-up-opencv-with-qt-on-c-with-dll-in-visual-stdio/8259/1 "2022-04-05T05:40:07Z")

</div>

hey guys, I built opencv with Qt by following this

[Qt official guidance](https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows)

and I generated some dll in my computer, but, this guidance is with QTCreator, If I want to use those dlls in VisualStdio(2019), How should I do, I googled it but found nothing ,everyone is using QtCreator.

---

<div class="post-metadata">

### Author: ![Chuckie\_Zhu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/chuckie_zhu/32/4928_2.png) [@Chuckie\_Zhu](https://forum.opencv.org/u/Chuckie_Zhu)
#### Post date: [April 5, 2022, 5:56am UTC](https://forum.opencv.org/t/how-to-set-up-opencv-with-qt-on-c-with-dll-in-visual-stdio/8259/2 "2022-04-05T05:56:35Z")

</div>

I tried this option:  
CMAKE\_GNUtoMS\_VCVARS change to checked.  
and I got some lib files:

```auto
libopencv_aruco455.lib
libopencv_barcode455.lib
libopencv_bgsegm455.lib
libopencv_bioinspired455.lib
libopencv_calib3d455.lib
libopencv_ccalib455.lib
libopencv_core455.lib
libopencv_datasets455.lib
libopencv_dnn455.lib
libopencv_dnn_objdetect455.lib
libopencv_dnn_superres455.lib
libopencv_dpm455.lib
libopencv_face455.lib
libopencv_features2d455.lib
libopencv_flann455.lib
libopencv_fuzzy455.lib
libopencv_gapi455.lib
libopencv_hfs455.lib
libopencv_highgui455.lib
libopencv_imgcodecs455.lib
libopencv_imgproc455.lib
libopencv_img_hash455.lib
libopencv_intensity_transform455.lib
libopencv_line_descriptor455.lib
libopencv_mcc455.lib
libopencv_ml455.lib
libopencv_objdetect455.lib
libopencv_optflow455.lib
libopencv_phase_unwrapping455.lib
libopencv_photo455.lib
libopencv_plot455.lib
libopencv_quality455.lib
libopencv_rapid455.lib
libopencv_reg455.lib
libopencv_rgbd455.lib
libopencv_saliency455.lib
libopencv_shape455.lib
libopencv_stereo455.lib
libopencv_stitching455.lib
libopencv_structured_light455.lib
libopencv_superres455.lib
libopencv_surface_matching455.lib
libopencv_text455.lib
libopencv_tracking455.lib
libopencv_video455.lib
libopencv_videoio455.lib
libopencv_videostab455.lib
libopencv_wechat_qrcode455.lib
libopencv_xfeatures2d455.lib
libopencv_ximgproc455.lib
libopencv_xobjdetect455.lib
libopencv_xphoto455.lib

```

and I tried to use it like using Opencv\_world455d.lib.  
I input all the lib file names, but It doesn’t work to me, error is like:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opencv/original/2X/a/a60526a3cd366855a69328d14d16be882d35a6a4.png)  
and if I check the build\_opencv\_world\_box, it will raise some error, so I cannot check the opencv\_world now.

---

<div class="post-metadata">

### Author: ![Christophe\_Jacquelin](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/christophe_jacquelin/32/135_2.png) [@Christophe\_Jacquelin](https://forum.opencv.org/u/Christophe_Jacquelin)
#### Post date: [April 5, 2022, 11:48am UTC](https://forum.opencv.org/t/how-to-set-up-opencv-with-qt-on-c-with-dll-in-visual-stdio/8259/3 "2022-04-05T11:48:46Z")

</div>

use QT Creator instead Visual Studio.  
Rgds
