<html>
<head>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
</head>
<body style='FONT:10pt Courier New;COLOR:#000000;background:;'><table style="Z-INDEX: 2; BORDER-BOTTOM: #c0c0c0 1px solid; POSITION: static; BORDER-LEFT: #c0c0c0 1px solid; BACKGROUND-COLOR: #ffffff; MARGIN-TOP: 17px; WIDTH: 500px; FONT-FAMILY: Tahoma,Arial; HEIGHT: 66px; MARGIN-LEFT: 12px; FONT-SIZE: 10pt; BORDER-TOP: #c0c0c0 1px solid; BORDER-RIGHT: #c0c0c0 1px solid; text-align: left;"> <tbody> <tr> <td style="padding: 7px 6px 6px 8px; margin: 0px; border: 0px none; vertical-align: top; width: 100%;" id="" creatediv="true"><div id="TABLEDIV" style="line-height: 130%;">Hi!</div><div id="TABLEDIV" style="line-height: 130%;"><br></div><div id="TABLEDIV" style="line-height: 130%;">I'm trying to link shared libraries with filename extension ".so" (like the ROOT libraries from root.cern.ch). This works fine using Makefiles, also on Mac OS. Using option -G Xcode however it does not work:</div><div id="TABLEDIV" style="line-height: 130%;"><br></div><div id="TABLEDIV" style="line-height: 130%;">I use something like</div><div id="TABLEDIV" style="line-height: 130%;"><br></div><div id="TABLEDIV"><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;">target_link_libraries(myexe /full/path/to/somelib.so)</p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><br></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;">Running cake with -G Xcode prints a warning:</p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><br></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"> "Target "myexe" links to item /full/path/to/somelib.so which is a full-path but not a valid library file name."</p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><br></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;">When I run the build step in Xcode the linking step fails with</p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"> <span style="text-indent: -12px;">ld: library not found for -lsomelib.so.</span></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><span style="text-indent: -12px;"><br></span></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><span style="text-indent: -12px;">What's going wrong here? I have this problem whenever I try to link a shared library with .so filename extension and option -G Xcode.</span></p><p style="line-height: normal; margin: 0px; font-size: 11px; font-family: Menlo;"><span style="text-indent: -12px;"><br></span></p><p style="text-indent: -12px; margin: 0px;"><font face="Menlo"><span style="font-size: 11px;"> As a work around everything works fine when I use</span></font></p><p style="text-indent: -12px; margin: 0px;"><font face="Menlo"><span style="font-size: 11px;"><br></span></font></p></div><div id="TABLEDIV" style="line-height: 130%;"><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">LINK_DIRECTORIES( /full/path/to )</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">and add -lsomelib to the link flags of my exe. But this is an annoying workaround because I'd like to use FIND_LIBRARY to search for the library and FIND_LIBRARY returns /full/path/to/somelib.so. </p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">Cheers,</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;">Bjorn</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><br></p></div></td> <td style="width: 0%; padding: 0px 0px 0px 0px;"></td> </tr> </tbody></table><br><div style='FONT:10pt Courier New'></DIV><div style='FONT:10pt Courier New'></DIV></body></html>