473,796 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ 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,*.t lb, *.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 2205
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,*.t lb, *.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****@newsgro ups.nospam> wrote in message
news:ey******** ******@TK2MSFTN GP09.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,*.t lb, *.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
1605
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 deploying the application on another machine and I want to change the web reference that I have added. As we do it for the database connection string which we put in the we.config file and could be changed later at any time. Is there any such...
2
6807
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 is contained in the same assembly as the control. As far as I know, the only way to do this using the designer is to add the UserControl-derived object
2
16947
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
1758
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++ sample project to run, the .lib file needs to be added to the additional dependencies, the Stack Reserve Size needs to be 2meg, the WIN32 directive must be included, and the runtime library must be Multi-threaded Debug DLL. The sample app...
0
2081
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: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmsrvsdk/htm/configuringbrdcstpubpt.asp Currently, it is barebones until I get this resolved. <code> Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices
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 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
5
49832
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. To do this, I created a reference to "Microsoft Excel 11.0 Object Library", and have a "using Excel;" directive. I decided to add a method for creating a TextBox using the Shapes.AddTextBox method, which requires a
5
4603
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 to add a dictionary of name-value pairs. In other words, instead of a single name-value, I want to add a name-value collection in there. I could do this:
12
3020
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. The global variables and global functions are hidden to prevent from accessing by the programmers. All global functions share global variables. Only very few global functions are allowed to be reusability for the programmers to use. Few...
0
9527
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9050
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.