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

J

JKop

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
 
I

Ioannis Vranos

JKop said:
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.
 
I

Ioannis Vranos

Ioannis said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top