Archived

This topic is now archived and is closed to further replies.

darkchrono4

Visual Studio.Net Question

Recommended Posts

Those are usually called static libraries.

First you need to set a path to the directory under Tools->Options->Projects->VC++ Directories->Library Files

Then Projects-> Properties->Linker->Input
and you add the name of the lib here, e.g. wsock32.lib.

You can also put
#pragma comment(lib, "wsock32.lib)
in a source file and it will link it in (this only works with MSVC, but since it's a comment the code will still compile on other platforms).

[edited by - Magmai Kai Holmlor on November 14, 2003 4:30:32 PM]

Share this post


Link to post
Share on other sites
As Fruny mentioned in another thread on this exact subject a couple of days ago, you can also just add them directly to the project in question.

And a .lib can also be an import library.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites
Doing "Projects-> Properties->Linker->Input" won''t work on another compiler either

Magmai: You don''t need to add the directory to VS.NET''s global lib path. The Linker->Additional Inputs entry takes absolute or relative paths.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites