5

I want to use c++ dll on unity android application. To use native dll on a android device, I learn that I should use Unity 5. I download unity5 from here. My application requires vuforia. So I download vuforia package from here.

Unity 5 is 64 bit.

On unity editor, I delete MainCamera and add ARCamera. There is an error message on unity console. The message is below :

Failed to load 'Assets/Plugins/QCARWrapper.dll', expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386.
Vuforia.WebCamAbstractBehaviour:CheckNativePluginSupport()

There is a solution for this problem on vuforia forum. But I don't find unity editor(32 bit)

zakjma
  • 2,030
  • 12
  • 40
  • 81

6 Answers6

8

To use Vuforia with Unity 64 bit, just move the QCARWrapper DLLs from /Plugins to /Plugins/x86. These are the DLLs:

  • QCARWrapper.exp
  • QCARWrapper.lib
  • QCARWrapper.dll
  • QCARWrapper.dll.signature

This should solve the problem!

Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
Balbuzar
  • 127
  • 1
  • 6
  • vuforia 5.5 contains VuforiaWrapper.dll instead QCARWrappper, move this and its related files into x86 folder as suggested) and don't forget to restart unity. – Muhammad Faizan Khan Aug 02 '16 at 09:45
2

Go to https://unity3d.com/get-unity/update Under there, you will see ADDITIONAL DOWNLOADS Under that you will see FOR WINDOWS. Click it and choose Unity Editor (32-bit).

EDIT: I see lots of dowvotes. This was the ONLY solution when this question was asked. Unity 5 64bit just got released when this question WAS asked and this was the ONLY solution back then. This answer was changed to the current answer that was provided 5 months later when Vuforia released 64bit version of their plugin.

Programmer
  • 121,791
  • 22
  • 236
  • 328
  • 1
    You told him to install Unity 32bit along with his existing Unity 64 bit version to solve this? – StevoKeano May 31 '15 at 16:43
  • Dude, read his question and then my answer before coming to a conclusion. He has a plugin problem and he found the solution. The solution was to install 32 bit Unity version but he couln't find the 32 bit version on Unity website. My answer provides a step on how to find it on Unity website. – Programmer May 31 '15 at 19:03
  • Still **TODAY** that Unity 5+ is released, your answer **does** deserve a down-vote so that people don't see it as a good answer they should follow. – Dimitris May 26 '16 at 15:27
  • @Dimitris You are either naive or there is lack of comprehension in your side or maybe probably both. You think an answer that was the only solution available and solved the OP's problem at that time should be voted down? A person with a common sense would look at the date in my answer then date in other answers and realize there wasn't any other answer around. Also, this answer is still useful for those who do not want to update their Vuforia plugin to 64 bit version. There are many answers on SO which are outdated but were helpful in the beginning. Should they all be down-voted too? – Programmer May 26 '16 at 16:01
  • He needed Unity 32 bit version but couldn't find it so I provided the link and instructions on how to find it. – Programmer May 26 '16 at 16:05
2

Vuforia 5.0 supports the 32bit version of the Unity Editor on Windows, and the 64bit version on Mac.

So, There are two possible solutions:

  1. you just need to install and use the Unity 5 32bit Editor, on Windows.

OR

  1. Create a new folder "x86" inside

    Assets>>Plugins

    inside your unity project structure Then move the following files from "Plugins" to newely created "x86" folder.

    • QCARWrapper.lib
    • QCARWrapper.dll
    • QCARWrapper.dll.signature
    • QCARWrapper.exp

After that check log message, If you see the log like:

Setting platform to 'Editor' for plugin: Assets/Plugins/x86/VuforiaWrapper.dll
UnityEngine.Debug:Log(Object)
Vuforia.EditorClasses.ExtensionImport:UpdatePluginSettings() (at Assets/Vuforia/Editor/Scripts/ExtensionImport.cs:43)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

Then , Congrats !! You are ready to Go!

Sanket Prabhu
  • 2,232
  • 3
  • 20
  • 33
1

I had the same problem /Failed to load 'Assets/Plugins/QCARWrapper.dll'/ with vuforia plugin and latest version of Unity ( currently 5.1.2f 64bits ) and also couldn't get my laptop camera to work.

Everything is fixed with the 32 bit release of Unity, even if my os is 64 bits (Windows 7).

0

If you are using Unity 5.1, make sure to set the right Graphics API settings in the Player Settings for Android and iOS:

disable the "Automatic Graphics API" checkbox in the Graphics APIs list, make sure that only OpenGL ES 2.0 is included: Android: remove OpenGL ES 3.0 iOS: remove OpenGL ES 3.0 and METAL

Important : 1. In your Unity project:

Select the QCARWrapper.bundle in the Unity Project view (located under Assets > Plugins ), so that its settings are shown in the Unity Inspector Change the settings of QCARWrapper.bundle in the Unity inspector from "Any Platform" to "Standalone + Editor".

Rebuild

​OR:

  1. In the Xcode project generated by Unity:

Go to Build Phases > Copy Bundle Resources Remove the QCARWrapper.bundle file from the list Rebuild

My unity3d version is 5 and 64bit ,Os is Windows7 64 bit.

my Problems solved .

Edit :

Unity editor couldn't show laptop camera ,But Rebuild Project , camera work . for example rebuild Android platform , and install .apk on device => application Ok .

0

Go to Name_Vuforia_Unity_Project\Assets\Plugins and you will find QCARWrapper.dll.

Delete it and try again (could be necessary to restart unity).

Unity 64 bit

Jakob Runge
  • 2,287
  • 7
  • 36
  • 47
J C
  • 731
  • 7
  • 11