File corrupt

kaveh rahimi 61 Reputation points
2021-09-08T21:49:30.85+00:00

Hi , I have 'ch341dll.lib' file when I open it in c++ I receive error LNK1127. How can I take 'ch341dll.lib' file. because the error says that this file is corrupt.
Please help
Thanks

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,526 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Castorix31 81,636 Reputation points
    2021-09-08T22:04:36.317+00:00

    I just downloaded it from CH341PAR_ZIP.html
    and it is not corrupted, it works fine

    #pragma comment(lib, "CH341DLL.LIB")
    
    0 comments No comments

  2. Sam of Simple Samples 5,516 Reputation points
    2021-09-09T00:11:22.627+00:00

    Is it a 32-bit or 64-bit library? More important, does your project match what it is? If it is 32-bit and your project is 64-bit then you will get that error.

    See How to: Configure projects to target platforms. That page is a little complicated but I think the following is what you need to do. From the menu bar, choose Build > Configuration Manager. In the top-right is Active solution platform. From the drop-down choose x86. Then close that window and try again.


  3. YujianYao-MSFT 4,271 Reputation points Microsoft Vendor
    2021-09-09T05:56:09.417+00:00

    Hi @kaveh rahimi ,

    The LINK1127 error occurs because the file is corrupted and you need to rebuild the library.

    Please make sure the number of bits in the project and library files are the same, If the library is 32-bit and your project is 64-bit then you will get that error.

    You should check if the platform and configuration settings are consistent with the build time.
    130641-sssss.png
    It is recommended you could set Configuration and Platform in the property settings to ALL.
    130652-aa.png

    After Using #pragma comment(lib, "CH341DLL.LIB"),there was no error after linking the library.

    Could you please tell me how do you use this lib?

    Best regards,

    Elya


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.