The first video below shows the steps of installing Visual Studio with the correct environment. You may pause and watch it at a slow speed if needed. No audio for the video.   

The second video below shows the steps of creating LibTRF example from scratch. A detailed script with screenshots are available below the video. You may pause and watch it at a slow speed if needed. No audio for the video.  



Visual Studio DLL Integration Guide

1. Create Project

Create an Empty C++ Project in Visual Studio

 

2. Add main.cpp

Right-click the sources file, and add a new item to create main.cpp

 

3. Folder Structure

Create the following folder structure:

C:\libs\libtrf\
libtrf.h
libtrf.lib
libtrf.dll
   libusb-1.0.dll

 

 

4. Configure Project Properties

Project à Properties

 

 

 

 

 

 

 

 


Properties à C/C++ → General → Additional Include Directories

Properties à Linker à General à Additional Library Directories

Properties à Linker à Input à Additional Dependencies

 

5. Post-Build DLL Copy

Properties à  Build Events → Post-Build Event


In the command Line argument, add the following:

copy /Y "C:\libs\libtrf\libtrf.dll" "$(OutDir)" & copy /Y "C:\libs\libtrf\libusb-1.0.dll" "$(OutDir)" & exit 0


6. Update main.cpp with an example

 


7. Update main.cpp with the example, then run

Build and run the application:
 

 

Result:


8. Additional Information

  1. If you change the configuration from Debug to Release must reconfigure properties or switch to All Configurations in properties when applying the settings

 

libusb dll can be found here: