Platform mismatch

Ask questions for installation
Post Reply
Posts: 2
Joined: Wed Jun 29, 2011 6:44 pm

Platform mismatch

Post by SeriousTyro » Wed Jun 29, 2011 7:57 pm

I've just installed Emgu CV. I'm using Visual Studios 2010 on a Windows 7 64 bit computer.
When executing the examples from Emgu.CV.Example, I got the error:
" Platform mismatched: CLR is 32 bit, C++ code is 64 bit. Please consider recompiling the executable with the same platform target as C++ code."

This was fixed by downloading the correct instead of x86.

I have a problem now when trying to add a project to the solution. I copy the contents of the HelloWorld example and changing the namespace variable accordingly. I now get the same error and can't seem to figure out why.

When looking at the project property of HelloWorld I noticed that the selection of "Platform:" is Active(Any CPU) and "Platform target:" is Active(Any CPU).
However, when looking at the property of my project, I am only allowed to select "Platform:Active(x86)" while I am able to select Any CPU for "Platform target:".

I was thinking this might be the reason for platform mismatch. What else could be the reason?


Posts: 16
Joined: Thu Jun 21, 2012 8:48 am

Re: Platform mismatch

Post by jeeshenlee » Tue Jun 26, 2012 7:15 am

Ran into the same problem. I fixed it by deleting the reference in the project and re-add the reference to the dll (of my Build Target Platform).

Make sure your References and your Build Target Platform as on the same bit: 32bit (for both) or 64 bits (for both). Don't mix them up (they don't play well when it's mixed). :)

Post Reply