CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Posts
    4

    Adding libraries to Win32 Console Application

    Hi all,

    I am trying to build a library in VC++. It's instruction says something like the folowing:

    Create a new empty project of type "Win32 Console Application"

    Click on "Project", and then on "Add to Project", and then on "Files"

    Select "library files (.lib)" from the "Files of type" drop-down list.

    Now, it seems they have used a previous version of VS as the above directions are not useful in the version I am using, i.e. Visual Studio 2005

    Any ideas? Seems they have changed the way the libraries are added.

    Regards,

    Abhi

  2. #2
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    Re: Adding libraries to Win32 Console Application

    Type in the name of the .lib file in Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies.

    Make sure the .lib file can be found in the search path.
    If the .lib file is in a different path make sure you add the path where the .lib file exists in Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories
    «_Superman
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

  3. #3
    Join Date
    Dec 2008
    Posts
    144

    Re: Adding libraries to Win32 Console Application

    Quote Originally Posted by abhipro View Post
    Any ideas? Seems they have changed the way the libraries are added.
    They have changed only the captions
    Project->Add Existing Item... and select your lib file.

    Or you can use #pragma comment(lib, "libname.lib") in your code.

Tags for this Thread

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