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><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 href="http://www.people.fas.harvard.edu/%7Egmalecha/" target="_blank">http://www.people.fas.harvard.edu/~gmalecha/</a></div><br>