Hi RF,
"RF" <ra*******@SPAMdialexia.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi All,
How can I use the *.lib as a reference in a C# solution. Whenever I try to
add a "lib" file, VS throws an error explaining it must have a dll
extension?
You *cannot* add references to static unmanaged/native libraries.
"Add reference..." is to add a [reference] to other .NET assemblies,
that resides in dynamic libraries.
If you want to use the content of a static library, I would advice you
to make a small wrapper project in C++, link with the library, expose
the needed functions (with a .def-file or alike), compile the whole lot
with the /clr compiler switch (Use Managed Extentions), and add a
reference to it.
--
Lars Wilhelmsen
http://www.sral.org/
Software Engineer
Teleplan A/S, Norway