Open alakoring opened 6 years ago
@alakoring Hi! Thanks for the report.
Was this directory (WinObjC-0.2.180220
) generated by cloning our repository, downloading the release tag, or pulling our NuGet packages?
Due to a GitHub issue, the ZIP generated from the release tag is not usable: GitHub doesn't include Git LFS files in the final archive.
Oh drat, it was the .zip (that always seems simplest since I don't have to install anything). I now vaguely remember reading that didn't work…
If you get past this and run into further issues, we're tracking changes that improve our compatibility with VS 2017 Update 5 and beyond:
If you're building the samples, or any applications that do not consume C++, you should be okay.
Oh, because https://developer.microsoft.com/en-us/windows/bridges/ios said to get the .zip file…
I have one or two .mm files, but they don’t use STL.
Yes, I had to unload NugetRestore, otherwise this error blocked me
After that, I got HelloUI working (switched samples because it seemed a little simpler).
Darn, I am using std::string so I guess I am using STL. I am blocked by that…
(BTW, thanks for the prompt and helpful reply, Dustin — you’ve saved me a lot of frustration.)
I don’t see a 64-bit configuration there, and my vsimporter run didn’t make one for my own project. Is this supported?
You may still be able to scrape by using std::string
without type_traits
. I don't have a handle on exactly which headers are impacted, unfortunately. They change with every VS release, and the gulf is only going to widen until the #2837 work lands.
Unfortunately, 64-bit isn't supported. It looks like you found #122 tracking that; it's obviously a pretty old one! In a lot of places we're not 64-bit clean, and it's a tough uphill battle to become 64-bit clean:
DWORD
for pointers (!)I stubbed out my limited use of std::string, and eventually managed to get all my code building as a (32-bit) DLL. But, per #2861, the Unity Editor is now 64-bit. (I think I can download a 2 year old version, but that’s not a very good answer for a big project.)
This game doesn’t use NSInvocation, and I could probably rewrite my limited use of exceptions. But I guess you’d have to do the whole thing.
Sadly, it looks like I may have to rethink Windows support.
As far as I know, Unity discontinued the 32 bit version of their IDE but did not end support for 32 bit builds. I would imagine that you could target your project to x86 in Unity's build settings and in that way utilize the 32 bit dll you've been able to build. You would have to make sure everything else your project uses is 32 bit as well.
https://blogs.unity3d.com/2016/11/15/end-of-support-for-32-bit-editor-for-windows/
(Specifically the paragraph titled, "I use 32-bit plugins, what are my options?")
I think the 64-bit Unity editor still needs to have a usable plugin, even though it can target 32-bit. At least that’s how I interpreted its error messages.
But at least Unity 5.6 isn’t as old as I feared I would have to try.
I'm fairly confident that the 64 bit editor should play nice with 32 bit plugins as long as your build settings are targeting x86 and not x86_x64. Only the latter would require a 64 bit dll.
I get
Failed to load 'Assets/Plugins/SAPlugin.dll', expected x64 architecture, but was x86 architecture. You must recompile your plugin for x64 architecture.
although the build settings are for x86. (I assume it’s because I’m not actually building when I use the Editor. But I haven’t used Unity enough to be certain.)
I grabbed the 1802Eval VM (for Parallels) and downloaded WinObjC. I had to do some Visual Studio updating, but finally got to the point where I could get this error. None of it really makes any sense, since I'm not a Windows user any more. I have no idea what manifests or tasks are in the Visual Studio world.
My expectation is that the samples build.