-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflicts when static linking a library that uses mbedtls #1126
Comments
I'm working on using solution 2, and I've had some luck. In a hacky way, it's possible to link against mbedtls of current and old hxcpp versions just by using hxcpp_ssl. The flags haven't changed too much since it was introduced, so it should be backwards compatible as well. This includes SSL.cpp which is unwanted, but it's a minor inconvenience and can be solved for future versions by rearranging the hxcpp xml files as suggested (see #1133). One issue I ran into was that MBEDTLS_NET_C has been undefined in the mbedtls config since e5003a3. This causes linking issues with the current version of cURL that lime is using (because it uses functions from |
As mentioned in #1133:
|
In static builds of lime projects, lime's mbedtls conflicts with hxcpp's (more info at openfl/lime#1767). This will be a problem especially with the mbedtls 3 upgrade (#1113).
I'm not sure if this might be the same issue as #777, because that talks about including .lib files.
There are two possible solutions I can think of.
Solution 1: Hxcpp uses lime's mbedtls
HXCPP_LINK_NO_MBEDTLS
. We would also need to add a flag to set the include path of mbedtls (e.g.HXCPP_MBEDTLS_INCLUDE_DIR
). Maybe we'd also need to allow passing in a customMBEDTLS_USER_CONFIG_FILE
path?Solution 2: Lime uses hxcpp's mbedtls
depending on whether hxcpp is built with ssl or not (hxcpp would have to provide some way to check this)*, lime has manually include hxcpp's mbedtls when finally linking the project.@hughsando I was wondering if you have any thoughts?
* EDIT: there is no need for this, as including the same sources twice doesn't seem to cause issues.
The text was updated successfully, but these errors were encountered: