I have a problem for installing mcrypt correctly on windows 7 64bit. I tried to download the mcrypt-2.6.7-win32.zip, it is just an exe i can use with the terminal. I also tried to download the libmcrypt library but i have no idea what i need to do after that. I didn't find any answer in google so I'd love your help.
How do I install this library on windows 7 64bit?
Hmm. That's... a really good question. I got emokit building on 32-bit XP because that's just what I had a VM kickin' around for, and that was using the prebuild mcrypt that it looks like every windows php installation on the planet uses. So we need to find a better solution for x64. It's definitely on the todo list.
Qdot: You mentioned that you got emokit working on windows using the mcrypt dll which comes with php. Where did you put this dll such that emokit's cmake stuff can find it - or did you have to modify the cmake file or use a different build process?
Edit 1: I discovered how to specify where the hidapi and mcrypt dlls are in the cmake-gui and how to generate .sln files (for visual studio.) When building in visual studio I now have these issues: http://pastie.org/private/ielepopqhf1dvzkjdpx2g
Edit 2: Sorted the include issues by putting mcrypt.h in the include directory and hidapi.h in /include/hidapi/. I assume the remaining errors are some subtlety involving windows. Shall look into it...
Happy0: could you please describe the details of "Edit 1" in your post above? Much appreciated!
Sure, no problem! I should have been more clear in anticipation of this happening, actually.
Using the CMake GUI, specify the source path (the emokit root directory) and where you wish emokit to be built (in my case, in a 'build' folder i made in the route of the emokit directory.) Press configure, select your compiler (in my case Visual Studio 10.)
When you hit configure again, I believe it will ask you to specify the path to hidapi. Hidapi can be found on github, and it has a .sln file you can open to build it in visual studio and produce the required .lib and .dll files by building the project. Once those are specified, and you hit configure, I think it then asks for the mcrypt path. I found the mcrypt .lib and .dll files online somewhere (if you have difficulty finding them, I can upload them somewhere.) Then when you hit generate, cmake should produce the .sln files for emokit in the build folder. You can then build the project using visual studio using the .sln file...
Let me know if you need any help - this took me a couple of days. Good luck!
Thanks! I have no problem with hidapi. However, I am unable to find mcrypt.h and mcrypt.lib. Right now, I have the following config options in cmake - the question marks are obviously stuff I need to figure out:
OK, I downloaded libmcrypt, and am using the following options:
With this, the correct .h files are getting picked up, at least; not fully sure about the lib files.
Now, after cmake and trying to build emokit.sln, I'm getting errors compiling contact.c and emokitd.c. They look very similar to the ones you mentioned. How did you get them resolved?
My compiler output is here: http://pastie.org/5924729
Thanks very much for the help, I really appreciate it!
If you don't have any luck with the mcrypt lib/dll, here is the copy of the ones I found: https://dl.dropbox.com/u/35473318/dlls.zip
As for those compiler errors, those are indeed familiar. Turns out that the compiler must not be using the C99 C standard by default (which allows you to mix declarations and code.) There must be a flag somewhere in visual studio to compile with respect to this standard instead, but I didn't have a look... However, to get round it quickly I just declared everything at the top of their respective functions. Like this, for example:
No problem, I'm glad I can be helpful for a change rather than burdening this community with questions :P.
Thanks - this helps a lot (both of those things)! I still need to do more work to see if everything's working, but at least I don't see any build errors now.
No problem! Let me know how you get on :P