Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > OT: G++, static linkage with std::

Reply
Thread Tools

OT: G++, static linkage with std::

 
 
JKop
Guest
Posts: n/a
 
      09-21-2004
I post here because the G++ newsgroup is dead.

Plus there's plenty of people in here with all sorts of
computer knowledge...

Anyway,

I compiled a Win32 program today. Out of curiosity, I ran
DependencyWalker on it. I see that it links dynamically
with MSVCRT.DLL.

Firstly, what compiler switches are there for specifying
static or dynamic linkage with the Standard libraries?

Secondly, which would you recommend? If "msvcrt.dll" comes
packaged with Windows, then it's the obvious preferable
choice - smaller executable, only one "copy" of the library
in memory at the one time. But if it's *not* packaged with
Windows, then it looks like dynamic linkage would be the
better choice!

-JKop
 
Reply With Quote
 
 
 
 
Ioannis Vranos
Guest
Posts: n/a
 
      09-21-2004
JKop wrote:
> I post here because the G++ newsgroup is dead.
>
> Plus there's plenty of people in here with all sorts of
> computer knowledge...
>
> Anyway,
>
> I compiled a Win32 program today. Out of curiosity, I ran
> DependencyWalker on it. I see that it links dynamically
> with MSVCRT.DLL.
>
> Firstly, what compiler switches are there for specifying
> static or dynamic linkage with the Standard libraries?
>
> Secondly, which would you recommend? If "msvcrt.dll" comes
> packaged with Windows, then it's the obvious preferable
> choice - smaller executable, only one "copy" of the library
> in memory at the one time. But if it's *not* packaged with
> Windows, then it looks like dynamic linkage would be the
> better choice!



Off topic. Generally speaking here is the GCC manual:

http://gcc.gnu.org/onlinedocs/



Also for Windows programming you can use MINGW mailing lists:


http://www.mingw.org


And since we are here, I suggest you download the latest updates that
you are interested in:


http://www.mingw.org/download.shtml#hdr2

(from the "Current" section.

E.g. you may download the bin parts of the GCC subsection and bring your
GCC to 3.3.1


Basically check the dates vs the date of the "MINGW" main distribution
to find the new ones.



--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
 
 
 
Ioannis Vranos
Guest
Posts: n/a
 
      09-21-2004
Ioannis Vranos wrote:

> http://www.mingw.org/download.shtml#hdr2
>
> (from the "Current" section.
>
> E.g. you may download the bin parts of the GCC subsection and bring your
> GCC to 3.3.1
>
>
> Basically check the dates vs the date of the "MINGW" main distribution
> to find the new ones.




Basically the date approach is not good, since they reposted the package
in September bug fixed. Check anything from 1 August 2003 and later.






--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ linkage vs c linkage ramasubramanian.rahul@gmail.com C++ 1 09-12-2008 11:41 AM
simulating private member functions--static linkage Bill Pursell C Programming 4 05-01-2006 03:44 PM
Problem: shared object loading runs constructor of a static object, but static linkage does not. tropos C++ 3 11-30-2005 04:54 PM
linkage error when initializing static member array Neno C++ 2 10-23-2004 10:15 AM
scope, static and linkage pembed2003 C++ 6 05-27-2004 01:23 AM



Advertisments