<div dir="ltr"><div>Is this in your package file?</div><div><div><font face="monospace, monospace">targets: [</font></div><div><font face="monospace, monospace"> Target(</font></div><div><font face="monospace, monospace"> name: "Foo",</font></div><div><font face="monospace, monospace"> dependencies: [.Target(name: "Bar")]),</font></div><div><font face="monospace, monospace"> Target(</font></div><div><font face="monospace, monospace"> name: "Bar")</font></div><div><font face="monospace, monospace">]</font></div></div><div><br></div><div>-david</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 3:02 AM, Tarun Joshi via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>I was following the github documentation to create multiple modules ( <a href="https://github.com/apple/swift-package-manager/blob/master/Documentation/SourceLayouts.md" target="_blank">https://github.com/apple/swift-package-manager/blob/master/Documentation/SourceLayouts.md</a> ) in a package.</div><div><br></div>My package directory looks like this:<div>SwiftTest/Package.swift</div><div>SwiftTest/Sources/Bar/bar.swift</div><div>SwiftTest/Sources/Foo/foo.swift</div><div><br></div><div>bar.swift :</div><div> public func bar() {</div><div> print("bar")</div><div> }</div><div><br></div><div>foo.swift :</div><div> import Bar</div><div> public func foo() {</div><div> bar()</div><div> }</div><div><div><br></div><div>Compiling this produces an error saying : foo.swift: error: no such module 'Bar'</div><div>When I remove dependency of 'Bar' module from foo.swift (by removing import statement and call to 'bar'), it compiles fine.</div><div>Am I missing something here? Can't I use imports directly?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- <br><div><div>Regards,</div>`Tarun`<div><br></div></div>
</div></font></span></div></div><span class="HOEnZb"><font color="#888888">
<img alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</font></span><br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>