Chào mừng đến với Diễn đàn lập trình - Cộng đồng lập trình.
Trang 1 của 2 12 CuốiCuối
Kết quả 1 đến 10 của 19
  1. #1
    Ngày tham gia
    Sep 2015
    Bài viết
    0

    Cách nào để add được 1 File .LIB vào Project trong VC++6.0


  2. #2
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Bạn vào tab Link mà điền vào. Cái tab bên cạnh cái tab hiện tại đó. Nó ở phía trên.

  3. #3
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    2 cái thư viện mình lấy là ở bên ngoài LIB của VC++( thư viện .lib là CkBaseRelDll.lib và ChilkatDbgSt.lib) vậy thì làm sao mà VC++ nó biết được,h phải làm thế nào để kết nối đường dẫn cho nó đây,đặt mỗi tên của nó vào mình dịch không được

  4. #4
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Có hai cách.
    Một là bạn thêm đường dẫn tới thư mục chứa file lib đó
    Hai là bạn copy các lib đó vào thư mục lib của VC++

    Sau đó chỉ việc thêm tên vào cái ô đó thôi.

  5. #5
    http://www.example-code.com/vcpp/SimpleSendEmail.asp đây chính là việc mình muốn làm,mình muốn sử dụng cái thư viện chilkatsoft này nè

  6. #6
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Có vẻ bạn chưa hiểu. Vậy mình sẽ nói kỹ hơn.



    Đầu tiên bạn mở cái tab như hình trên ra. Trong ô directories bạn chọn include files như trên.

    Tiếp theo bạn click vào cái biểu tượng bên trái cái biểu tượng gạch chéo.
    Tiếp theo bạn điền đầu đủ đường dẫn đến cái thư mục include của thư viện đó.
    Tương tự như vậy cho thư mục lib.

    Cuối cùng bạn chỉ việc add các thư viện cần thiết bên tab link.
    Enjoy!

  7. #7
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Cũng có cách khác là chép cả file.lib và .h vào chung thư mục với thư mục chứa source code.

  8. #8
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Trích dẫn Gửi bởi meoconlongvang
    Cũng có cách khác là chép cả file.lib và .h vào chung thư mục với thư mục chứa source code.
    đây là source ,có tận 107 lỗi lận,mình làm giống mèoconlong vang,cũng add cả các thư viện .h vào nhưng không được



    --------------------Configuration: 1234 - Win32 Debug--------------------
    Compiling...
    main.cpp
    Linking...
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: __stricmp already defined in LIBCD.lib(stricmp.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strstr already defined in LIBCD.lib(strstr.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memchr already defined in LIBCD.lib(memchr.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _rand already defined in LIBCD.lib(rand.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncmp already defined in LIBCD.lib(strncmp.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in LIBCD.lib(sprintf.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strchr already defined in LIBCD.lib(strchr.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strrchr already defined in LIBCD.lib(strrchr.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _sscanf already defined in LIBCD.lib(sscanf.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _strncpy already defined in LIBCD.lib(strncpy.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: __strnicmp already defined in LIBCD.lib(strnicmp.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _memmove already defined in LIBCD.lib(memmove.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in LIBCD.lib(fprintf.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fwrite already defined in LIBCD.lib(fwrite.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _printf already defined in LIBCD.lib(printf.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _srand already defined in LIBCD.lib(rand.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fclose already defined in LIBCD.lib(fclose.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fopen already defined in LIBCD.lib(fopen.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _fseek already defined in LIBCD.lib(fseek.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _ftell already defined in LIBCD.lib(ftell.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _isalnum already defined in LIBCD.lib(_ctype.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in LIBCD.lib(dbgheap.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _calloc already defined in LIBCD.lib(dbgheap.obj)
    MSVCRT.lib(MSVCRT.dll) : error LNK2005: _abort already defined in LIBCD.lib(abort.obj)
    LINK : warning LNK4098: defaultlib "MSVCRT" conflicts with use of other libs; use /NODEFAULTLIB:library
    ChilkatDbgSt.lib(ClsCert.obj) : error LNK2001: unresolved external symbol __imp__CertCreateSelfSignCertificate@32
    ChilkatDbgSt.lib(ClsCert.obj) : error LNK2001: unresolved external symbol __imp__CertStrToNameA@28
    ChilkatDbgSt.lib(ClsCertStore.obj) : error LNK2001: unresolved external symbol __imp__PFXExportCertStoreEx@20
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertVerifyRevocation@28
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CryptDecodeObject@28
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertGetIntendedKeyUsage@16
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChain@4
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChain@4
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateChainEngine@4
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateChain@32
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateChain@32
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertCreateCertificateChainEngine@8
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertGetCertificateContextProperty@16
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertCreateCertificateContext@12
    CkBaseRelDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CertCreateCertificateContext@12
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CryptAcquireCertificatePrivateKey@24
    CkBaseRelDll.lib(KeyContainer.obj) : error LNK2001: unresolved external symbol __imp__CryptAcquireCertificatePrivateKey@24
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateCertificateContext@4
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty@16
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSetCertificateContextProperty@16
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext@4
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertFreeCertificateContext@4
    CkBaseRelDll.lib(Certificate.obj) : error LNK2001: unresolved external symbol __imp__CertNameToStrA@20
    CkBaseRelDll.lib(Mx.obj) : error LNK2001: unresolved external symbol _DnsQuery_A@24
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDuplicateStore@4
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertCloseStore@8
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertCloseStore@8
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertEnumCertificatesInStore@8
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertOpenStore@20
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertOpenStore@20
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertFindCertificateInStore@24
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertAddEncodedCertificateToStore@24
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertAddCertificateContextToStore@16
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertSaveStore@24
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertDeleteCertificateFromStore@4
    CkBaseRelDll.lib(CertificateStore.obj) : error LNK2001: unresolved external symbol __imp__CertGetSubjectCertificateFromStore@12
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptSignMessage@28
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptEncodeObject@20
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptVerifyDetachedMessageSignature@32
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptDecodeMessage@52
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptDecryptMessage@24
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptEncryptMessage@28
    CkBaseRelDll.lib(CK_Crypt.obj) : error LNK2001: unresolved external symbol __imp__CryptVerifyMessageSignature@28
    CkBaseRelDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXImportCertStore@12
    CkBaseRelDll.lib(Pfx.obj) : error LNK2001: unresolved external symbol __imp__PFXVerifyPassword@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__setsockopt@20
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__accept@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__socket@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__inet_addr@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__htons@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__ntohs@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__getsockname@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__getpeername@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__gethostbyname@4
    CkBaseRelDll.lib(HostnameResolve.obj) : error LNK2001: unresolved external symbol __imp__gethostbyname@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__connect@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__ioctlsocket@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__select@20
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__listen@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__bind@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__htonl@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__getservbyname@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__gethostbyaddr@12
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__getservbyport@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__gethostname@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__closesocket@4
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__shutdown@8
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__send@16
    CkBaseRelDll.lib(ChilkatSocket.obj) : error LNK2001: unresolved external symbol __imp__recv@16
    CkBaseRelDll.lib(ChilkatUrl_wininet.obj) : error LNK2001: unresolved external symbol __imp__InternetCombineUrlA@20
    CkBaseRelDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgClose@4
    CkBaseRelDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgGetParam@20
    CkBaseRelDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgUpdate@16
    CkBaseRelDll.lib(CryptoMsg.obj) : error LNK2001: unresolved external symbol __imp__CryptMsgOpenToDecode@24
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertOpenSystemStoreA@8
    CkBaseRelDll.lib(SChannel.obj) : error LNK2001: unresolved external symbol __imp__CertVerifyCertificateChainPolicy@16
    Debug/1234.exe : fatal error LNK1120: 70 unresolved externals
    Error executing link.exe.

    1234.exe - 107 error(s), 1 warning(s)

  9. #9
    Ngày tham gia
    Sep 2015
    Đang ở
    Hà Nội
    Bài viết
    0
    Thử tạo một static lib project mới, add lib và header vào project này.
    Add project mới tạo này vào cùng workspace với project của mình.
    Sau đó chép header của lib vào project của mình rồi set dependencies.

  10. #10
    Ngày tham gia
    Sep 2015
    Bài viết
    0
    Không biết cSharp đã đọc dòng này trong file readme.htm chưa?


    If your application fails to link because of unresolved externals that include
    error LNK2001: unresolved external symbol __imp__CertFreeCertificateChain@4
    the problem is that you're using Visual C++ includes and libs that are too old (probably from 1998). The best solution is to download (from Microsoft) the Microsoft Platform SDK from August 2001, or Feb. 2003 (which is the last one that works with VC++ 6.0).
    Tốt nhất bạn hãy down bản VS mới hơn về mà dùng.

    Mình vừa thử cho bạn trên VC++ 6 sau khi đã setting đầy đủ khi chạy vẫn báo lỗi linker. Mình mở file readme ra thì thấy cái dòng đó[IMG]images/smilies/biggrin.png[/IMG]

    Mình lấy cái lib của vc++9 cho vc++6 thì build ngon lành rồi. Nếu bạn chưa có thì mình send cho cái lib đó.

 

 
Trang 1 của 2 12 CuốiCuối

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •