<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 5/18/16 4:23 AM, meng qingkun via
llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:SIXPR0201MB09534B189FD55860A211E9EEB4490@SIXPR0201MB0953.apcprd02.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span>Hello, </span></p>
<p><span><br>
</span></p>
<p><span>I am a newbie of llvm. I want to learn how to use llvm
pass, but when I test the tutorial hello pass, the following
error comes up. </span></p>
<p><span><br>
</span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica,
sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
NotoColorEmoji, 'Segoe UI Symbol', 'Android Emoji',
EmojiSymbols; font-size: 11pt;"><span>opt: symbol lookup
error: </span>/home/mqk/software/llvm/llvm-3.4/Release+Asserts/lib/LLVMHello.so:
undefined symbol: _ZN4llvm9Statistic17RegisterStatisticEv</span></span></p>
</div>
</blockquote>
<br>
You can use the c++filt program to print a more readable version of
the symbol. When I use "c++filt __<span><span style="font-family:
Calibri, Arial, Helvetica, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', NotoColorEmoji, 'Segoe UI Symbol', 'Android
Emoji', EmojiSymbols; font-size: 11pt;">ZN4llvm9Statistic17RegisterStatisticEv"
(I had to add an extra underscore), I get:</span></span><br>
<br>
llvm::Statistic::RegisterStatistic()<br>
<br>
You need to find the LLVM library that defines this method and link
it into your pass by adding it to the LIBS or USEDLIBS variable in
the Makefile (or something similar).<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
<blockquote
cite="mid:SIXPR0201MB09534B189FD55860A211E9EEB4490@SIXPR0201MB0953.apcprd02.prod.outlook.com"
type="cite">
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span><br>
</span></p>
<p><span>I have read the answer suplied by "<b
style="font-family: 'Times New Roman';">Arnamoy
Bhattacharyya</b><span style="font-family: 'Times New
Roman';"> </span><a moz-do-not-send="true"
href="mailto:llvm-dev%40lists.llvm.org?Subject=Re%3A%20%5BLLVMdev%5D%20%22symbol%20lookup%20error%22%20while%20running%20a%20Simple%20Loop%20Pass&In-Reply-To=%3CCALu0%2BSnY0Piz03oa8mwjbv5qspt-oGetHdrPJMVDiaU3iKKNPw%40mail.gmail.com%3E"
title="[LLVMdev] "symbol lookup error" while
running a Simple Loop Pass" style="font-family: 'Times New
Roman';">arnamoy at ualberta.ca </a>" and I have also
built llvm in one and only directory, but the problem
remains. Could anybody help me fix this? thank you very
much! </span></p>
<p><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>