Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
341 views
in Technique[技术] by (71.8m points)

Using C++ libraries from Xamarin.iOS in Visual Studio 2019

we have a cross-platform Xamarin app currenly running on Android and Windows. Next, we want to port it to iOS. The project consists of a set of rendering libraries in C++/OpenGL and a Xamarin/C# layer which is used from the Xamarin mobile app.

My development setup is a MacBook Pro with Parallels and Visual Studio 2019. All the C++ libraries are compiled using vcremote, and the Mac is correctly paired and connected in Visual Studio for building and debugging Xamarin apps in iOS.

For Android we have a dynamic linked library which exposes a thin interface to the underlying C++ code which we consume using P/Invoke from Xamarin.

For iOS I understand that we need to link statically, but I don't see how I can do that with the current setup. I have made a static C++ iOS library which exposes the interface, just like the dynamic one in Android. The iOS library, however is of course compiled with vcremote, and the output .a file is only found on my Mac file system, it is not available from the Windows virtual machine, and I can not set up any reference to it from my iOS Xamarin project.

What is the workflow here? Is there something obvious I'm not seeing, or do I have to copy the .a file manually from the vcremote directory each time I build it?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...