Attached are two build logs from the same solution. The only difference is supposed to be the use of an Entitlements file in the iOS project. It's unclear why the project produces native linking errors with a referenced binding project after adding an Entitlements file.
In the log that uses the Entitlements file, I see lots of errors like:
Undefined symbols for architecture i386: (TaskId:512)
1 "std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
No errors. However, it does seem there could be an issue with the bombgar reference not being built for i386. I am just not sure why it's only surfacing when using Entitlements.
**Build Date & Platform**:
The Entitlements.xcent is given to the (native) linker thru mtouch's `--gcc_flags` but they are not merged into a single argument, e.g.
--gcc_flags=-stdlib=libstdc++ -v -v -v -v --gcc_flags "-Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/dougstephens/Library/Caches/Xamarin/mtbs/builds/Cortana.Container.MT/de95adc32953f62af35a8d808ab53983/obj/iPhoneSimulator/Debug/Entitlements.xcent"
So the call to `clang` only has the last one (the entitlement bits) and miss the customer's linker flags which specify the C++ library to be used. That result in the native linker error.
Change your Mtouch Extra Arguments value from "--gcc_flags=-stdlib=libstdc++ -v -v -v -v" to "--gcc_flags -stdlib=libstdc++ -v -v -v -v" and things will work.
(i.e. the current MSBuild logic does not handle "--gcc_flags=....", it only works if you do not use the '='.
PR merged in master
@Jeffrey , It would be great help if you have a look to comment6 and respond with your inputs.
Verified this issue with an iOS project referring to a bindings project and I couldn't reproduce this issue, hence I am marking this issue as verified fixed.
Build Log: https://gist.github.com/GouriKumari/0b56c64b42a10bbb402a22ee809147d4
## Test Env: