473,491 Members | 2,430 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Adding a reference to a static library in VS.NET

Hi,

I need to add a reference to a static library (*.lib) to a COM/ATL
project in VS.NET.
Apparently if this library is not in my solution that is not possible
using the ordinary way : Add Reference.
The Add Reference Dialog only allows me to browse and add a
*.dll,*.ocx,*.tlb, *.olb and *.exe.
No *.lib!
While if it is in the same solution I automatically see the library
project in the project tab and can reference it.

I do not want to move my library project to the solution where my
COM/ATL project is.
How can I still achieve adding that reference ?
Thanx!!!
Oct 19 '05 #1
2 2162
If your project is in managed code, you don't have an option of static
linking. In this case, you could write an unmanaged C++ (or VB or
whatever) DLL that statically links that .LIB file and then add a
reference to that DLL in your managed project.

Lady_A wrote:
Hi,

I need to add a reference to a static library (*.lib) to a COM/ATL
project in VS.NET.
Apparently if this library is not in my solution that is not possible
using the ordinary way : Add Reference.
The Add Reference Dialog only allows me to browse and add a
*.dll,*.ocx,*.tlb, *.olb and *.exe.
No *.lib!
While if it is in the same solution I automatically see the library
project in the project tab and can reference it.

I do not want to move my library project to the solution where my
COM/ATL project is.
How can I still achieve adding that reference ?
Thanx!!!

Oct 20 '05 #2
Uri,

My project is a C++ COM/ATL project (using VS.NET ATL Wizard).
Meaning unmanaged.

So how can I link to a lib that is not in my solution using VS.NET ?

Thanx!

"Uri Dor" <ta****@newsgroups.nospam> wrote in message
news:ey**************@TK2MSFTNGP09.phx.gbl:
If your project is in managed code, you don't have an option of static
linking. In this case, you could write an unmanaged C++ (or VB or
whatever) DLL that statically links that .LIB file and then add a
reference to that DLL in your managed project.

Lady_A wrote:
Hi,

I need to add a reference to a static library (*.lib) to a COM/ATL
project in VS.NET.
Apparently if this library is not in my solution that is not possible
using the ordinary way : Add Reference.
The Add Reference Dialog only allows me to browse and add a
*.dll,*.ocx,*.tlb, *.olb and *.exe.
No *.lib!
While if it is in the same solution I automatically see the library
project in the project tab and can reference it.

I do not want to move my library project to the solution where my
COM/ATL project is.
How can I still achieve adding that reference ?
Thanx!!!


Oct 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1589
by: Kshitij | last post by:
Hi, I am having a web application developed with me which contains a reference to a web service which is on the local network.Now I am creating the setup project for the web application. I will be...
2
6782
by: Chien Lau | last post by:
I frequently define internal UserControl-derived classes in my WinForms apps: internal class MyUserControl:UserControl{ ... } I'll often need to embed these controls in a Form, whose class...
2
16928
by: mphanke | last post by:
Hi, is there a programmatical way to add a port to the XP SP2 Firewall and open it or does this have to be configured manually?? Martin
1
1743
by: Lee Greco | last post by:
A third party vendor has provided me with a DLL authored in C++ .Net. The vendor's package includes the DLL, .lib and all necessary .h files and sample code to develop a C++ .NET app. For the C++...
0
2066
by: davec426913 | last post by:
I am having trouble with a reference in my VB.NET application. The code I am using is straight from MSDN:...
2
310
by: Lady_A | last post by:
Hi, I need to add a reference to a static library (*.lib) to a COM/ATL project in VS.NET. Apparently if this library is not in my solution that is not possible using the ordinary way : Add...
5
49755
by: Michael Russell | last post by:
Hi all, Using C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. ...
5
4570
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want...
12
2994
by: Bryan Parkoff | last post by:
I write my large project in C++ source code. My C++ source code contains approximate four thousand small functions. Most of them are inline. I define variables and functions in the global scope....
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.