473,320 Members | 2,003 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,320 software developers and data experts.

dyanamic/static linking on NT

I had posted simillar question some time back.
i want to link some libraries statically on NT.
currently, product execute command simillar to following.

link /STACK:0x20000 /libpath:D:/lib a.lib /out:out.exe x.obj a.lib

here a.lib is library , out.exe is executable

1. first of all, i think this itself is static linking. because, this link commad is used compile time only. am i correct?
2. If not, ( and i am surely wrong, because i used some tool that lists the dynamically linked libraries. n it showed, the library is dynamically linked) , tell me an option (or a method) which will ensure static linking on NT machine.

please give whatever input, u can.
Thanks in advance.
Jan 8 '07 #1
4 1539
Banfa
9,065 Expert Mod 8TB
Where a library is statically or dynamically linked is dependent on the library, not the linker command line you use.

A static library has a single *.lib file (which is likely to be quite large), when you link to the library you use *.lib on you linker command line and the library is linked statically.

A dynamic library consists of a *.lib file, which is quite small as it just contains redirection vectors and a *.dll file which is quite large as it contains all the code. When you link to the library you use *.lib on the linker command line but the linrary is linked dynamically.
Jan 8 '07 #2
Thanks for the reply.
As you said, the libraries i was linking, are stubs (just redirections). i checked the size of libs (.lib files) n its in KBs. and size of dlls is about 15mb.
now, what i want to know is, is there any way to link these libraries statically?
or i must have the .libs, that in themselves contain the full code?

is there ne way out?
Thanks
Jan 9 '07 #3
Banfa
9,065 Expert Mod 8TB
now, what i want to know is, is there any way to link these libraries statically?
no

i must have the .libs, that in themselves contain the full code?
yes

is there ne way out?
no



sorry
Jan 9 '07 #4
Thanks alot for the reply
Jan 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dibyendu Roy | last post by:
Hi All, I build an object called "dblorcle" to connect to oracle database in Sun solaris box. This is built linking with various oracle ".a" (archived, for static linking) files come with standard...
6
by: Andrew S. Giles | last post by:
Is it possible to bring in a static library (developed in C++) into a C# project/solution? Thanks in advance for any information. Andrew S. GIles
8
by: Robert A Riedel | last post by:
I have an application that requires a DLL and an executable that uses the DLL, both of which were implemented in Visual C++ using unmanged code. Both the executable and the DLL are linked with...
0
by: zhangrusi | last post by:
I have a static library that is compiled using the latest version of VC 6. It uses the multithreaded DLL versions of the run-time library, and it uses STL classes. I would like to make use of this...
1
by: srikar | last post by:
what is the difference between static linking & dynamic linking, what are the advantages of each? How to perform static linking & Dynamic linking by using gcc -o liniking will be done , but...
2
by: ashesman | last post by:
OK, I have written an application in MS Visual C# using .net. Is it posibble to static link into one self contained .exe file? This would certainly make distribution of a small accessory file...
0
by: xieml2007 | last post by:
Dear Madam or Sir, I encountered one problem which is quite similiar to the discussions launched at the web site: http://www.thescripts.com/forum/thread280324.html
1
by: vipinvishnoi | last post by:
hi , this is vipin vishnoi. can any body help me regarding my problem... how to generate dyanamic dropdown list after selection specific value from another dropdownlist in asp.net with C#? ...
4
by: aaragon | last post by:
Hi everyone, I have a linking error when using gcc4.2 and static member variables. The class template definition is something around the following: template<> class Element<L2_t: public...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.