Setup Guide

This guide will help you with the setup of your host machine in order to properly build NvGamepad and run the sample.

Please ensure your system meets the NvGamepad Prerequisites before proceeding further.

Installing and Building on Windows Host

This section will walk you through the setup of NvGamepad and the sample on a Windows development PC, for Android and Windows build targets.

Targeting Windows Host

  1. Unzip the pack to a directory on the Windows Host PC. We will call this directory NVGAMEPAD_ROOT.
  2. Launch Visual Studio 2010 or 2012.
  3. Open the sample project file: {NVGAMEPAD_ROOT}/samples/build/vs201[0,2]win32/GamepadSample.sln.
  4. Build the solution as release or debug.
  5. The resulting apps will be placed in {NVGAMEPAD_ROOT}/samples/bin/vs201[0,2]x86/.
Common Build and Runtime Errors

On Windows 7, running some of the samples may show a dialog indicating that XINPUT1_4.DLL could not be found. This can generally be solved as follows:

  1. Right-click the failing sample's icon in the Visual Studio Solution Explorer.
  2. Click Properties.
  3. Click Linker.
  4. Click Input.
  5. Find xinput.lib in the list.
  6. Replace xinput.lib with xinput9_1_0.lib.
  7. Rebuild the sample.

Targeting Android Device

  1. Unzip the samples pack to a directory on the Windows Host PC. We will call this directory NVGAMEPAD_ROOT.
  2. If you haven't already, download and install the Tegra Android Development Pack (TADP) for Windows. Be sure to include NVIDIA Nsight Tegra, Visual Studio Edition as an installed component.
  3. Launch Visual Studio 2010 or 2012.
  4. Open the sample project file: {NVGAMEPAD_ROOT}/samples/build/vs2010android/GamepadSample.sln (only VS2010 project files are included for Android, but they will open with warnings in VS2012).
  5. Build the solution as release or debug.
  6. The resulting app APK will be placed in {NVGAMEPAD_ROOT}/samples/bin/Tegra-Android/.
Common Android Build Errors
BUILD FAILED
C:\NVPACK\android-sdk-windows\tools\ant\build.xml:542: Unable to resolve project target 'android-14'

Can be solved as follows:

  1. Run {NVPACK}/android-sdk-windows/SDKManager.exe.
  2. Click deselect all.
  3. Find Android 4.0 (API14).
  4. Check SDK Platform.
  5. Click Install packages.
  6. Follow the steps to accept the license and install the package.
[dx] Could not create the Java virtual machine.
[dx] Error occurred during initialization of VM
[dx] Could not reserve enough space for object heap

Can be solved as follows:

  1. Edit {NVPACK}\android-sdk-windows\build-tools\{each version}\dx.bat.
  2. Find the line:
    set defaultMx=-Xmx1024M
    And change the 1024 to 512, like:
    set defaultMx=-Xmx512M
  3. Save and exit.
  4. Restart Visual Studio.
  5. Rebuild.

 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.220830 ©2014-2022. NVIDIA Corporation and affiliates. All Rights Reserved.