467,878 Members | 1,253 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,878 developers. It's quick & easy.

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
  • viewed: 1212
Share:
4 Replies
Banfa
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
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

Post your reply

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

Similar topics

reply views Thread by Dibyendu Roy | last post: by
6 posts views Thread by Andrew S. Giles | last post: by
8 posts views Thread by Robert A Riedel | last post: by
reply views Thread by zhangrusi | last post: by
2 posts views Thread by ashesman | last post: by
4 posts views Thread by aaragon | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.