none
How to Build Open Source Library .Dll Generation RRS feed

  • Question

  • I am using development environment of windows 8.1 64Bit + Visual Studio 2013 + Qt Creator 5.4.2.

    Qt Creator wants to run a project developed as CMakeList.txt. When I run CMakeList, I get an error that the required libraries in that project do not exist.

    The libraries are open source libraries, so you can download them from the official website.

    FreeType Library (FreeType 2.9.1) &
    libpng Library (libpng 1.6.35) &
    zlb Library (zlib 1.2.11) &
    little cms Library (LCMS 2.9)

    I want to use the libraries listed above.

    After unpacking the libraries, there is a Project folder inside the folder and Visual Studio.Sln (solution) exists so that you can run Visual Studio Project. I want to build a DLL and register it in the system and let CMakeList run normally.

    Release 64 Build in Visual Studio doesn't build due to errors like "~ .h" file not found.

    How can I make a DLL file of an open source library?

    Thank you
    Thursday, August 15, 2019 11:49 PM

All replies


  • Hi Pada_,

    Welcome to the MSDN forum.

    ###When I run CMakeList, I get an error that the required libraries in that project do not exist.

    >>>Did you build your project in VS?

    If so, according to your description, you have problems importing third-party libraries in your project. Please follow these steps:

          1. Put all your libraries you want to import into the root of your project

          2. Add the code "#pragma comment( lib,"the path of .lib files" )"

          3. then you can write "#include<xxxx.h>" to reference your class library in your project.

    ###After unpacking the libraries, there is a Project folder inside the folder and Visual Studio.Sln (solution) exists so that you can run Visual Studio Project. I want to build a DLL and register it in the system and let CMakeList run normally.Release 64 Build in Visual Studio doesn't build due to errors like "~ .h" file not found.

    >>>When you build a project successfully, the msbuild will create the .dll file in output folder. This may be a problem with the class library itself. You should ask the developer of this class library.

    <><>BTW, you can also redirect your issue to Stack Overflow with tag cmake for better support.

    Any feedback will be expected.

    Best Regards,

    Perry


    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


    Friday, August 16, 2019 9:24 AM
  • Hi Pada_,

    Did you try my steps to handle your issue?

    Also, l have found another solution for you to troubleshot your issue.

    When you open your project, right-click on the project->Properties and you should configure these settings to identify your libraries you imported.

    >>>You should add the folder address for header file on the first option.

    >>>Add the path of the lib folder which contains all the libraries on the second option.

    Besides, do not forget to add the path of the lib folder under the picture.

    Any feedback will be expected.

    Best Regards,

    Perry



    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

    Monday, August 19, 2019 9:09 AM