CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Posts
    82

    link library problem

    I want to use a specific library in my VC project. I added the directory of the library into Windows environment path. But when I compiled and linked my code, I still got a "cannot open file XXX.lib" link error? What should I do? Thank you so much!

    OS: Windows XP
    MS VC++ 6.0

  2. #2
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: link library problem

    Go to Project->Settings->Link tab->Select Category Input

    In the "additional library path" provide the path of the lib file

  3. #3
    Join Date
    Jul 2005
    Location
    E: 120°.6, N: 31°.3′
    Posts
    795

    Re: link library problem

    Quote Originally Posted by olin
    I want to use a specific library in my VC project. I added the directory of the library into Windows environment path. But when I compiled and linked my code, I still got a "cannot open file XXX.lib" link error? What should I do? Thank you so much!

    OS: Windows XP
    MS VC++ 6.0
    You can try to copy *.lib files what you want to your project folder , it will not appear any more .


    Hope this post help you .

    Cheers.

  4. #4
    Ejaz's Avatar
    Ejaz is offline Elite Member Power Poster
    Join Date
    Jul 2002
    Location
    Lahore, Pakistan
    Posts
    4,211

    Re: link library problem

    In addition to Kirants, have a look at #pragma comment

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: link library problem

    My dime:

    Quote Originally Posted by olin
    I want to use a specific library in my VC project. I added the directory of the library into Windows environment path.
    PATH environment variable is used for searching of exacutables. For library searching LIB environment variable exists.
    Best regards,
    Igor

  6. #6
    Join Date
    Feb 2004
    Posts
    82

    Re: link library problem

    Quote Originally Posted by kirants
    Go to Project->Settings->Link tab->Select Category Input

    In the "additional library path" provide the path of the lib file
    Thank you! It works!

  7. #7
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: link library problem

    You are welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured