<div dir="ltr"><div>
<p>After resolving the opengles conflict with llvm code base, I am stuck at undefined symbol error,</p><p>Undefined symbols for architecture i386:</p>
<p> "(anonymous namespace)::<b>LoweredValue</b>::<b>$_6</b>::<b>$_7</b>::<b>~$_7()</b>", referenced from:</p>
<p> (anonymous namespace)::<b>LoweredValue</b>::<b>LoweredValue</b>(<b>swift</b>::<b>irgen</b>::<b>Explosion</b>&) in libSwift.a(<b>IRGenSIL</b>.o)</p>
<p>ld: symbol(s) not found for architecture i386</p><p>I am not getting this error, when I link the swift libs generated by the build script that comes with the swift source.</p><p>This error is generated, only when I included all the swift front-end source[except Immediate.a source ] in my project and compiled it as a single static library and linked it to my app.</p><p>I believe the following code (<b>IRGenSIL.cpp</b>) is the one that mentioned in the error:</p><p class=""><span class=""><b>LoweredValue(Explosion &e)</b></span></p><p class=""><span class=""><b> : kind(Kind::Explosion), explosion{{}} {</b></span></p><p class=""><b><span class=""> </span><span class="">auto</span><span class=""> Elts = e.claimAll();</span></b></p><p class=""><span class=""><b> explosion.values.append(Elts.begin(), Elts.end());</b></span></p><p>
</p><p class=""><span class=""><b> }</b></span></p><p>Thanks</p><p>Ramakrishna</p>
</div><div>
</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 18, 2016 at 3:17 AM, Joe Groff <span dir="ltr"><<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Mar 17, 2016, at 2:22 PM, Ramakrishna Mallireddy <<a href="mailto:ramakrishna.malli@gmail.com">ramakrishna.malli@gmail.com</a>> wrote:<br>
><br>
> The libLLVMContainer.dylib is actually from opengl.framework.<br>
> On iOS the lib may be loaded by opengles.framework and I am not using any opengl myself, ios may be loading it by default.<br>
><br>
> I have compiled llvm core & support libs along with my llvmtest code, Even then the conflict remains.<br>
> How to I get around this.<br>
<br>
</span>You should statically link in any LLVM libraries you need, ensuring you link the versions built as part of your swiftc build. LLVM libraries are not ABI-stable, and any LLVM libraries that might happen to be distributed in the OS are not for use outside the OS.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Joe<br>
<br>
</font></span></blockquote></div><br></div>