My project uses openSSL and that works fine.

I needed one specific function that cannot be accessed from Swift directly, so 
I created a C-file for that. (both .h and .c file)

The function is found during compilation.

But is then reported as “unused” and the linker reports “missing function”.

Any idea’s how this can be caused?

More info:

The .h file:

static void sslCtxSetTlsExtServernameCallback(SSL_CTX *ctx, int (*cb)(SSL *, 
int *, void *), void *arg);

The .c file:

static void sslCtxSetTlsExtServernameCallback(SSL_CTX *ctx, int (*cb)(SSL *, 
int *, void *), void *arg) {
    SSL_CTX_set_tlsext_servername_arg(ctx, arg);
    SSL_CTX_set_tlsext_servername_callback(ctx, cb);
}

Regards,
Rien

Site: http://balancingrock.nl
Blog: http://swiftrien.blogspot.com
Github: http://github.com/Swiftrien
Project: http://swiftfire.nl




_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to