<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 7/14/11 7:36 PM, Gregory Malecha wrote:
<blockquote
cite="mid:CAGraiHL274j-1BrXC8PupE20iM3gq3RzjrBar0RfjQFKNbJ-UA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
Hello,<br>
<br>
I have a question about how to set up a Makefile that generate a
.so that I can load into opt without getting duplicate symbols.
Here's what I have right now:<br>
</blockquote>
<br>
Have you tried removing LINK_COMPONENTS below? I suspect that the
opt binary already contains everying in the transformUtils library.<br>
<br>
-- John T.<br>
<br>
<blockquote
cite="mid:CAGraiHL274j-1BrXC8PupE20iM3gq3RzjrBar0RfjQFKNbJ-UA@mail.gmail.com"
type="cite"><br>
<span style="font-family: courier new,monospace;">LIBRARYNAME=previrt</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">SHARED_LIBRARY=previrt</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"></span><span
style="font-family: courier new,monospace;">LINK_COMPONENTS :=
transformUtils</span><br style="font-family: courier
new,monospace;">
<span style="font-family: courier new,monospace;">LINK_LIBS_IN_SHARED=1</span><br
style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">include
$(LEVEL)/Makefile.common</span><br style="font-family: courier
new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">LIBS +=
-lprotobuf</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">CPPFLAGS +=
-I${HOME}/.root/usr/include -DGOOGLE_PROTOBUF_NO_RTTI</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">LDFLAGS +=
-Wl,-L${HOME}/.root/usr/lib/</span><br style="font-family:
courier new,monospace;">
<span style="font-family: courier new,monospace;">PROTOC=${HOME}/.root/usr/bin/protoc</span><br>
<br>
I'm pretty sure the problem comes from LINK_LIBS_IN_SHARED, but my
code depends on the google protobuf library so I need to link
against that otherwise I get undefined symbols.<br>
<br>
Does anyone know how to solve this problem with LLVM makefiles?<br>
<br>
Thank you.<br clear="all">
<br>
-- <br>
gregory malecha<br>
<div><a moz-do-not-send="true"
href="http://www.people.fas.harvard.edu/%7Egmalecha/"
target="_blank">http://www.people.fas.harvard.edu/~gmalecha/</a></div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</body>
</html>