Skip to content

Commit

Permalink
Merge pull request #1678 from fzyzcjy/feat/1610
Browse files Browse the repository at this point in the history
Add doc to explain how to configure ios build system to avoid "linker undefined symbols"
  • Loading branch information
fzyzcjy authored Jan 18, 2024
2 parents 9a82afc + 6c2d5d0 commit ffe2292
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions website/docs/manual/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Troubleshooting

## Linker complains undefined symbols

e.g. `ld: Undefined symbols: std::__1::basic_string ...`

Please change the following line in iOS/macos podspec file:

```
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib.a',
```

To something like:

```
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib.a -lc++',
```

Or other libraries that you need (e.g. `-framework SystemConfiguration`, `-framework AudioToolbox`, etc).

Please refer to these issues for more details: [cargokit#52](https://github.com/irondash/cargokit/issues/52), [bridge#1610](https://github.com/fzyzcjy/flutter_rust_bridge/issues/1610).

## Issue with `store_dart_post_cobject`

If calling rust function gives the error below, please consider running **cargo build** again. This can happen when the generated rs file is not included when building is being done.
Expand Down

0 comments on commit ffe2292

Please sign in to comment.