<br><br><div class="gmail_quote">On 10 August 2010 02:32, Josh Faust <span dir="ltr"><<a href="mailto:jfaust@willowgarage.com">jfaust@willowgarage.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
</div>Happy to hear that it works in general (would be pretty bad if it<br>
didn't...).  I'm more concerned about whether we're currently<br>
specifying everything completely, or unknowingly exploiting<br>
overlinkage.<br>
<br>
I guess the only way to find out is to build and test everything with<br>
that option included.<br><font color="#888888"><br></font></blockquote><div><br></div></div><div>I just did two quick tests:</div><div> 1) .so that overrides a global symbol (strstr in this case)</div>

<div> 2) .so with a global object that has a constructor/destructor</div><div><br></div><div>#1 worked, #2 failed (the .so was removed).</div><div><br></div><div>If #1 failed I'd say we can't default to it.  Not sure how important #2 is, but it's something that could definitely cause problems that would be difficult to track down.</div>


<div><br></div><font color="#888888"><div>Josh </div></font></div></blockquote><div><br></div><div>Josh, how did you produce result 2)? I just tested it here to be aware of when it might break and couldn't reproduce the failure. It correctly excludes/includes the library when I comment/uncomment the relevant usage of the variable. Snippets below:</div>
<div><br></div><div>LIBRARY HPP:</div><div><br></div><div>namespace ecl {<br><br>class A {<br>public:<br> A() : i(3) {}<br> ~A() {}<br>       int i;<br>};<br>extern const A a;<br><br>}<br></div><div><br></div><div>LIBRARY CPP:</div>
<div><br></div><div>namespace ecl {<br></div><div><br></div><div>const A a;</div><div><br></div><div>}</div><div><br></div><div>MAIN CPP</div><div><br></div><div>int main() {<br></div><div>    std::cout << "i: " << ecl::a.i << std::endl;</div>
<div>    return 0;</div><div>}</div><div><br></div><div><br></div><div><br></div><div><br></div></div><br clear="all"><br>-- <br>Phone : +82-10-5400-3296 (010-5400-3296)<br>Home: <a href="http://snorriheim.dnsdojo.com/">http://snorriheim.dnsdojo.com/</a><br>
Yujin Robot: <a href="http://www.yujinrobot.com/">http://www.yujinrobot.com/</a><br>Embedded Control Libraries: <a href="http://snorriheim.dnsdojo.com/redmine/wiki/ecl">http://snorriheim.dnsdojo.com/redmine/wiki/ecl</a><br>