1

When trying to port the Calculator sample from the official Windows Bridge for iOS blog, I always get the following error after converting the project and trying to compile it:

could not acquire lock file for module 'UIKit' Calculator (Calculator\Calculator) W:\Source\Bridgetest\Calculator\Calculator\ViewController.h 9

I am using the latest version of the bridge 0.1 Preview (April 29, 2016). Oh, and I am using Parallels for my Windows VM. Any ideas?

Robin-Manuel Thiel
  • 2,206
  • 19
  • 26

1 Answers1

0

I believe your question has been answered on Github, but I'll answer it here as well in case it's useful to anyone who finds this:

The problem here was the project and the WinObjC SDK were both located on a network share, which is how Windows identifies folders that Parallels shares between Windows and OS X. This causes problems for both vsimporter and Visual Studio.

Normally, vsimporter writes an absolute path to the WinObjC SDK in any imported projects. If you invoke vsimporter with the -relativepath option it will write a relative path instead. In either case, you also have the option to define WINOBJC_SDK_ROOT as an environment variable, which will take precedence over the path hard-coded in the project file.

If you would like to keep your code on a shared directory that is accessible from both OS X and Windows (so you can develop in Xcode and Visual Studio simultaneously from the same code base), you can do so. However, by default, Visual Studio will not register an app with the system if its files are on a network drive, so you'll have to change a few settings to get Visual Studio to build and run. Instructions for doing so can be found in our FAQ on Github.

Nick Gerard
  • 141
  • 2
  • I'm getting the same error while trying to compile a WinObjC sample app, HelloOpenGl, but your answer didn't help, unfortunately. I followed the FAQ and changed my output directory to start with $temp but that generated an error about incremental builds. I changed it to c:\WinObjC, and I got the same lock error. I set the environment variable WINOBJC_SDK_ROOT, restarted VS 2017, did a rebuild all, and still have the same lock error. I have my WinObjC git repo on a network drive (I'm running Windows 10 on Parallels). Any more ideas? – Ron Jul 10 '17 at 20:37