?
Solved

Adding library files to a VC++ program

Posted on 2003-03-21
7
Medium Priority
?
333 Views
Last Modified: 2009-12-16
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
Comment
Question by:drhodes1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 1

Expert Comment

by:igor_sk
ID: 8185155
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
 

Author Comment

by:drhodes1
ID: 8190202
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
 
LVL 1

Expert Comment

by:igor_sk
ID: 8195461
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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

Author Comment

by:drhodes1
ID: 8199925
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
 
LVL 1

Expert Comment

by:igor_sk
ID: 8203006
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
 

Author Comment

by:drhodes1
ID: 8207645
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
 
LVL 1

Accepted Solution

by:
igor_sk earned 75 total points
ID: 8207911
No problem. Anytime. I glad that your problem is solved.
Igor.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Simple Linear Regression
Progress
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question