Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Errors with LINKER settings (cannot use external library)

Status
Not open for further replies.

micha12

Programmer
Dec 11, 2002
10
RU
Hello everybody,

I'm having problems with linking and other settings in Visual C++ .NET.

I have downloaded a library from the internet, followed all the instructions on setting the project, typed &quot;#include <...>&quot;, set the linker options, but I keep on getting errors when I try to compile my project. It is not the first time I face problems with these damn settings. Now it tells me &quot;Cannot open input file &quot;D:\Program.obj&quot;. I do not have any .obj files in my linker settings (the file from the Internet has a .lib extension). I guess that the linker is trying to get access to the folder &quot;D:\Program Files\ ...&quot;, but still there are no reasons as to why it should look there, I think.

Another problem: I typed &quot;#include <...>&quot; in my .cpp file. When I right click this text and select &quot;Open document ...&quot; I am able to open this document, but when I then try to open documents included (#include) in this file, I get an error &quot;File not found ...&quot;. But the same thing works in Visual C++ 6.0! What the hell?

I am very confused, since I do not have any problems writing my own C++ code, and face these stupid difficulties when I try to use other people's libraries! Can anybody tell me where I could get information on solving these problems?

Thanks in advance.
 
Well there is no magic going on here. The IDE and related tools just use the file system to locate things. Your code and/or configuration settings tell the tools where in the file system to look for the files. That is really all that is going on there.

So if things are not found you need to change settings to supply the correct path information to find them right? There are both project based settings and environment global settings for paths. Under the menu TOOLS/OPTIONS the Options dialog has an entry for “VC++ Directories”. Under the menu PROJECT/<name> SETTINGS the Project dialog has entry under linker for “Additional Library Directories”


-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top