Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-08 Thread Ján Kosa via swift-users
; > Could you have a quick look if I didn't mess up or missed something and I > will create bug report. If you want to run the code for yourself, you will > have to change the path to dylib in the PluginConsumer (I don't know how to > use relative path and didn't have t

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-08 Thread Ján Kosa via swift-users
f you want to run the code for yourself, you will have to change the path to dylib in the PluginConsumer (I don't know how to use relative path and didn't have time to find out yet) On 8 October 2017 at 09:51, Ján Kosa via swift-users wrote: > I was afraid it will come to tha

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-07 Thread Ján Kosa via swift-users
bug in bugs.swift.org? There may be something we need > to fix in SwiftPM before this can work (because of our linking model). > > - Daniel > > > On Oct 7, 2017, at 10:42 PM, Ján Kosa via swift-users < > swift-users@swift.org> wrote: > > That is exactly what I did. The on

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-07 Thread Ján Kosa via swift-users
ary product like this: ‘@_exported import Protobuf’ in >>> some compiled swift file. Then from the other dependent modules “import >>> PluginProvider” - the protobuf symbols should be available, and all from >>> one (nonconflicting) source. >>> >>> Geordie >>

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-07 Thread Ján Kosa via swift-users
or >>> one (swift package clean) and ensure the Package.swift files are correctly >>> set up to output the shared library. >>> >>> Sorry I can’t be more specific, I’ve had these same kinds of issues >>> before but I’m not 100% what they were. >&

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-07 Thread Ján Kosa via swift-users
y I can’t be more specific, I’ve had these same kinds of issues before > but I’m not 100% what they were. > > Geordie > > > Ján Kosa via swift-users schrieb am Fr. 6. Okt. > 2017 um 14:41: > >> It worked! Took me a while to iron out details, but it is working now. >

Re: [swift-users] Communicating with dynamically loaded swift library

2017-10-06 Thread Ján Kosa via swift-users
ot;initializePlugin") > public func initializePlugin(_ ptr: UnsafeRawPointer) { > let manager = Unmanaged.fromOpaque(ptr). > takeUnretainedValue() > ``` > > HTH, > - Daniel > > On Oct 4, 2017, at 11:02 AM, Ján Kosa via swift-users < > swift-users@swift.org> wrote:

[swift-users] Communicating with dynamically loaded swift library

2017-10-04 Thread Ján Kosa via swift-users
Hello folks, I have been toying with dynamic libraries, trying to implement plugin functionality. I was able to get to the point where I can call simple function in loaded library, but I am having troubles starting more sophisticated communication channel. There are 3 projects - PluginConsumer is