static lib file in visual studio 2007

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Mar 2007
Posts: 50
Reputation: guy40az is an unknown quantity at this point 
Solved Threads: 2
guy40az guy40az is offline Offline
Junior Poster in Training

static lib file in visual studio 2007

 
0
  #1
Jul 14th, 2008
Can someone tell me how to add a static library file to a project in visual studio 2007.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 1,495
Reputation: William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of William Hemsworth has much to be proud of 
Solved Threads: 123
Sponsor
William Hemsworth William Hemsworth is offline Offline
Nearly a Posting Virtuoso

Re: static lib file in visual studio 2007

 
0
  #2
Jul 14th, 2008
Something like this perhaps ?
  1. #pragma comment(lib, "mylib.lib")
I need pageviews! most fun profile ever :)
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 50
Reputation: guy40az is an unknown quantity at this point 
Solved Threads: 2
guy40az guy40az is offline Offline
Junior Poster in Training

Re: static lib file in visual studio 2007

 
0
  #3
Jul 14th, 2008
In VC 6 you add it in.

Project --> Settings --> Link Tab --> change Catetory to input then add the library to the Object/library modules list. In the left pain, change Settings For to All Configurations.

I was just wondering if it was similar in 2007
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 401
Reputation: CoolGamer48 is on a distinguished road 
Solved Threads: 40
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Pro in Training

Re: static lib file in visual studio 2007

 
1
  #4
Jul 14th, 2008
If you'd like to link to a lib through the compiler's interface rather than using #pragma, right-click on your project's name in the panel to the left, go down to properties, expand linker, go to input, and put the libraries names in the additional dependencies field, separated by spaces.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 50
Reputation: guy40az is an unknown quantity at this point 
Solved Threads: 2
guy40az guy40az is offline Offline
Junior Poster in Training

Re: static lib file in visual studio 2007

 
0
  #5
Jul 15th, 2008
Thanks CoolGamer48 you are a genius
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 401
Reputation: CoolGamer48 is on a distinguished road 
Solved Threads: 40
CoolGamer48's Avatar
CoolGamer48 CoolGamer48 is offline Offline
Posting Pro in Training

Re: static lib file in visual studio 2007

 
0
  #6
Jul 15th, 2008
Originally Posted by guy40az View Post
Thanks CoolGamer48 you are a genius
No problem. It's not that hard after you do it once...
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum


Views: 2928 | Replies: 5
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC