Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3597122
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:04:39+00:00 2026-05-18T20:04:39+00:00

I wanted to learn how to use a .lib file in my C application.

  • 0

I wanted to learn how to use a .lib file in my C application.

So, I followed these steps:

  1. Created a empty project in VC++,

  2. Added a .c file,

  3. Added few c functions,

  4. Created a .h file for the same,

  5. Changed the projects type to .lib

  6. Built the project.

No problem till here.

Now,

  1. I copied the .h and the .lib file to desktop,

  2. created another VC++ empty project of type .exe,

  3. In poject prop.->config. prop.->c/c++->additional include directories,I added the path to desktop,

  4. In poject prop.->config. prop.->linker->additional library dependencies,I added the path to desktop,

  5. building the project gives LNK2019 (unresolved external symbol _...) and fatal error LNK1120 (unresolved external symbols).

What am I doing wrong? Also what would be the steps to use a .dll instead of .lib?

Configuration: Windows 7, VS2008.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:04:40+00:00Added an answer on May 18, 2026 at 8:04 pm

    You also have to add the library by name to the list of Additional Dependencies in Linker->Input options for your Project.

    Do you really want this linked in from the desktop, by the way? Typically some project-relative path or environment variable would be the way to do this – you do not want to link from desktop on a build server, for example.

    Switching to a DLL will not help because you still need to use the export library (.LIB) file for your DLL to satisfy the link-time dependencies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With my pet project I'm trying to learn to use Turbine as a DI
I need to develop a file indexing application in python and wanted to know
If I wanted to learn about pattern recognition in general what would be a
I am curious to learn Boost . But I wanted to ask: How important
After I've seen this PDC session I wanted to try to learn a bit
I wanted some of those spiffy rounded corners for a web project that I'm
I am trying to learn to use the wx packages to make GUI programs
I've always wanted to learn assembly, but there seems to be a jungle of
I want to learn to use Fluent NHibernate, and I'm working in VS2010 Beta2,
I've decided to use SQLite for my personal development project, because it just sprung

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.