473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 2156
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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,...
0
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...

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.