Coder Social home page Coder Social logo

Comments (9)

qdot avatar qdot commented on July 28, 2024

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.

from emokit.

Happy0 avatar Happy0 commented on July 28, 2024

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...

from emokit.

xenocyon avatar xenocyon commented on July 28, 2024

Happy0: could you please describe the details of "Edit 1" in your post above? Much appreciated!

from emokit.

Happy0 avatar Happy0 commented on July 28, 2024

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!

from emokit.

xenocyon avatar xenocyon commented on July 28, 2024

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:

CMAKE_INSTALL_PREFIX:PATH=C:/Users/mishra/Downloads/emokit-master/emokit-master/cmake_modules
HIDAPI_INCLUDE_DIR:PATH=C:/Users/mishra/Downloads/hidapi-master/hidapi-master
HIDAPI_LIBRARY:FILEPATH=C:/Users/mishra/Downloads/hidapi-master/hidapi-master/windows/Debug/hidapi.lib
Mcrypt_LIB:FILEPATH=???
Mcrypt_INCLUDE_DIR:PATH=???

from emokit.

xenocyon avatar xenocyon commented on July 28, 2024

OK, I downloaded libmcrypt, and am using the following options:

Mcrypt_LIB:FILEPATH=C:/Users/mishra/Downloads/libmcrypt-2.5.8.tar/libmcrypt-2.5.8/COPYING.LIB
Mcrypt_INCLUDE_DIR:PATH=C:/Users/mishra/Downloads/libmcrypt-2.5.8.tar/libmcrypt-2.5.8/include

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!

from emokit.

Happy0 avatar Happy0 commented on July 28, 2024

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:

http://pastie.org/5935993

No problem, I'm glad I can be helpful for a change rather than burdening this community with questions :P.

from emokit.

xenocyon avatar xenocyon commented on July 28, 2024

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.

from emokit.

Happy0 avatar Happy0 commented on July 28, 2024

No problem! Let me know how you get on :P

from emokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.