none
QT5 C++ library unit tests inside Visual Studio 2019 project RRS feed

  • Question

  • Hello!

    Do you have experience use QT library in visual studio 2019 ? Im looking solution for create unit tests (boost/google) for project with this library. I have some issue when try compile unit tests project.  Doesnt found some definitions from second project (same solution). Il have added reference to project which use Qt library.

    Qt version 5.12.1. Visual Studio 2019 current.

    Tuesday, November 19, 2019 10:53 PM

All replies

  • Hi Maciej Oblaza,

    Welcome to MSDN forum,

    According to your description, we recommend you could follow this workaround to write a unit test for visual C++:

    And for your issue, please check if link the related libraries or objects into your test project. Please follow the steps:

    1. In Solution Explorer, right-click on project node for the program you are testing, then choose Properties > Configuration Properties > VC++ Directories.
    2. Click on the down arrow in the "Library Directories" and "Include Directories" and choose <Edit>. 

    Please refer more here: To link the tests to the object or library files

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Wednesday, November 20, 2019 7:16 AM
  • OK, thank you for patience. Il fix this solution (dll dependencies for test binary)
    Thursday, November 28, 2019 11:32 AM