[Leap Motion] Setting up a C++ project with Visual Studio 2010

Yesterday, my Leap Motion Developer Device arrived and I started imeadiately to try the diverse SDKs. Setting up a Java project is simple because the official resource side provides an easy but great tutorial. A C++ project is some more difficult but fairly uncomplicated, as well, when you know how to configure include and library paths. Follow these easy steps to set up a project:

  1. Create a Win32 project via File -> New Project…
  2. Right click the project and select Properties
  3. Under Configuration Properties -> VC++ Directories -> Include directories add a link to [LeapSDK]\include
  4. Under Configuration Properties -> VC++ Directories -> Library directories add a link to [LeapSDK]\lib\x86
  5. Add Leap.dll (Or Leapd.dll in debug mode) under Linker -> Input.
  6. Include at least leap.h in your project and follow the official C++ tutorial to begin your first project.

Have fun! 🙂

10 thoughts on “[Leap Motion] Setting up a C++ project with Visual Studio 2010”

  1. when I run the sample code, it states that my leapd.dll is file is either corrupted or not working. any reason for this?

  2. Hi Sharon, check of the dll IS corrupted – by comparing the MD5 checksums or by simply redownloading the SDK again.

  3. these are the folders i have inside the leap SDK: (docs, include, lib, samples, util, head_sha, and version.) i didnt see any setup to double click in these folders. if what you mean is the leap.dll contain in lib folder under x64 folder, i have click it and it seams i dont have the software that can open it on my system.

    1. A dll is a file that offers functions for a specific purpose to other programs. You as user can’t use them directly. Did you add the leap.dll to the linker as mentioned in step 5? Otherwise I’d advise you to ask for help in the Leap Motion forum.

      1. i am trying to add dll as mention in step 5 but i am not getting option to add ddl in linker input. Would you able to tell me in where exactly i can find the option to add in linker input.

  4. I had the same problem. If you click on that error then it will take you to windows page and the page tells that you can add object file instead of dll. So in Properties->Configuration properties->Linker->Input->Additional Input, keep Leap.lib instead of Leap.dll

Leave a Reply

Your email address will not be published. Required fields are marked *