[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2117
  • Last Modified:

What is Visual studio 2005's equivalent to visual studio 6's "Link::Object/library modules"?


I'm having a specific technical problem, and was advised to change a linker setting. I was told "you need to remove the lib directories from your "Additional LIbrary Directories" setting and directly call out the full path to the library in "Link::Object/library modules"."

However, visual studio 2005 has no object/library modules. What feature is equivalent to this in visual studio 2005?

3 Solutions
We add reference to a assembly.
Project -> Add References
Choose the assembly to add.

sternoceraAuthor Commented:

That hasn't had the desired effect. I add a reference to "C:\libpqxx-2.6.9\lib\libpqxx.lib" . libpqxx.lib is in my Linker::Input::additional dependencies as well. I still get an error: "LINK : fatal error LNK1181: cannot open input file 'libpqxx.lib'"

Under "project /properties"  there a bazillion sub-tabs for "debug" and "Release" and "other" build types, under those tabs there are other tabs, eventually you'll find a tab that says "extra object files".   Under there you have to put a list of the object files you want to link with the project.  Of course there's no BROWSE button or "Test" button so anything you type there has to be from memory and is not verified until link time.  Sigh, what a bunch of crap VS is!

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

sternoceraAuthor Commented:

References don't apply to a particular configuration (debug/release). They are under "common properties".

I'm trying to explicitly refered to each lib under Linker::input::Additional Dependencies. Is that what you meant?,

Try adding your libraries via

#pragma comment(lib,"C:\\libpqxx-2.6.9\\lib\\libpqxx.lib")

or better

#pragma comment(linker,"/libpath:C:\\libpqxx-2.6.9\\lib")
#pragma comment(lib,"libpqxx.lib")

in your source code.
>>>> LNK1181: cannot open input file 'libpqxx.lib'
Whenever I had this error, the linker was right. There was some problem with that lib file, either it doesn't exist or - more likely - it was in use, e. g. in a hex editor or build command or it wasn't a valid lib file.

Try to copy the string "C:\libpqxx-2.6.9\lib\libpqxx.lib" directly from the definition in Linker - Input - Additional dependencies into the clipboard. Then, open a cmd window and paste the clipboard contents after a  'dir ' command. If there is some typo you should find out that way.

Where does that 'libpqxx.lib' come from. Maybe there was a problem when decoding. Does it have a size different from 0? You may check whether there is a copy of the lib somewhere else on the disk and whether it has the same size.

Note, you may use the name 'libpqxx.lib' only at Linker - Input - Additional dependencies and put the folder to the Linker - Common - Additional Library Folders ....

>>>> References don't apply to a particular configuration (debug/release).
That is not correct. All these definitions made at Project Properties are dependend on the active configuration made in the top combobox of the property dialog.

>>>> Sigh, what a bunch of crap VS is!
Hmmm, at least there are only a few really *hidden* features. You can *browse* by opening the .vcproj in text mode. Then you have a fair chance to find options (or typos) where for almost of them you can get help by simple click on them and press F1. The XML tree is exactly  made following the property tree, so there are actually other products which are much less intuitive than VS.

Regards, Alex
sternoceraAuthor Commented:

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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