Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

Adding library files to a VC++ program

I bought a usb interface board from Devasys and it came with a header file and a library file.  How do I get my visual c program to recognize the library file.
0
drhodes1
Asked:
drhodes1
  • 4
  • 3
1 Solution
 
igor_skCommented:
You should do the following:
1. Open Project->Settings menu item.
2. Go to the Link tab
3. Add the name of your library to 'Object/library modules' field.

Igor.
0
 
drhodes1Author Commented:
Should I also add the library as a file in the project, or does it just search the entire hard drive at run time?  Should I add the .dll in the project somehow?  
0
 
igor_skCommented:
You are asking correct question.
You can create directory Libs under your project directory and put your library (.lib file) there.

>> 3. Add the name of your library to 'Object/library modules' field
Then you will specify the library as Libs\your_lib_name.lib

You don't need to add .dll file to the project. You should put it some directory in your path. You can put it to the same directory where your .exe file is located.

Igor.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
drhodes1Author Commented:
Igor I really appreciate all of your comments.  They have been really benficial to my project.  However I'm still having a problem.  When I try to build my project I get an error that says it cannot open my library file.  Does this mean that either
1.  Something is wrong with the library file
2.  Or that it still can't find it.( I wasn't sure what you meant when you said "Then you will specify the library as Libs\your_lib_name.lib")
0
 
igor_skCommented:
Let's try something else.
Go to 'Project Settings'. Open Link tab.
Choose 'Input' in Category combo box.

Add the name of your library to 'Object/library modules' field and Libs to 'Additional library path' field.

Make sure that your library file is in Libs directory.

Hope it will help.
Igor.
0
 
drhodes1Author Commented:
I tried what you said and it still didn't work.  It was able to open the library but I was still getting errors on the functions that I called from the library.  Finally I just rewrote the project linking the .dll explicitly and it is working.  I have no idea what the problem was, but thanks for your help anyways.
0
 
igor_skCommented:
No problem. Anytime. I glad that your problem is solved.
Igor.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now