<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>Our main concern here is jmpbuf size.<BR>
And possibly exception interop. C++ throw should run Modula-3 finally en route to the C++ catch, and vice versa. Bonus points if each language can catch each other's exceptions, by type.<BR>
Oh and interop with other Modula-3 compilers. :)<BR>
Btw, you can see how profiling munges build_dir, same thing.<BR>
<BR>
<A href="http://www.boost.org/more/separate_compilation.html#static_or_dynamic">http://www.boost.org/more/separate_compilation.html#static_or_dynamic</A><BR>
<BR>
<H3><A name=abi></A>Preventing Compiler ABI Clashes</H3>
There are some compilers (mostly Microsoft Windows compilers again!), which feature a range of compiler switches that alter the ABI of C++ classes and functions. By way of example, consider Borland's compiler which has the following options:<BR><PRE>-b (on or off - effects enum sizes).
-Vx (on or off - empty members).
-Ve (on or off - empty base classes).
-aX (alignment - 5 options).
-pX (Calling convention - 4 options).
-VmX (member pointer size and layout - 5 options).
-VC (on or off, changes name mangling).
-Vl (on or off, changes struct layout).
</PRE>
<BR>
These options are provided in addition to those affecting which runtime library is used (more on which later); the total number of combinations of options can be obtained by multiplying together the individual options above, so that gives 2*2*2*5*4*5*2*2 = 3200 combinations! <BR>
<BR>
The problem is that users often expect to be able to build the Boost libraries and then just link to them and have everything just plain work, no matter what their project settings are. Irrespective of whether this is a reasonable expectation or not, without some means of managing this issue, the user may well find that their program will experience strange and hard to track down crashes at runtime unless the library they link to was built with the same options as their project (changes to the default alignment setting are a prime culprit). One way to manage this is with "prefix and suffix" headers: these headers invoke compiler specific #pragma directives to instruct the compiler that whatever code follows was built (or is to be built) with a specific set of compiler ABI settings.<BR>
<BR>
....<BR>
<BR>
For example the regex libraries get named as follows when built with Visual Studio .NET 2003:<BR><PRE>boost_regex-vc71-mt-1_31.lib
boost_regex-vc71-mt-gd-1_31.lib
libboost_regex-vc71-mt-1_31.lib
libboost_regex-vc71-mt-gd-1_31.lib
libboost_regex-vc71-mt-s-1_31.lib
libboost_regex-vc71-mt-sgd-1_31.lib
libboost_regex-vc71-s-1_31.lib
libboost_regex-vc71-sgd-1_31.lib
</PRE>
The difficulty now is selecting which of these the user should link his or her code to.<BR><br /><hr />Shed those extra pounds with MSN and The Biggest Loser! <a href='http://biggestloser.msn.com/' target='_new'>Learn more.</a></body>
</html>