Monday 4 August 2014

VRPN Compile and Install(Eng)

VRPN Tutorial.

VRPN is basically Server and Client network communication application.
For example, I have a mouse which is connected on the server computer. And I want to get the mouse data in another computer from the server computer. In this case, you can use the VRPN to grab the mouse data from the server computer. Of course, the server computer and another computer that I describe can be the same.

Environment: Windows 7, VS 2010.

1. Download VRPN,

http://www.cs.unc.edu/Research/vrpn/downloads/vrpn_07_31.zip

2. Extract the zip file.

3. Open the vrpn.sln file for VS2010.
You can see the conversion window.
Just press the "Finish" button.

4. Select the "Library" in Solution Explore. and build twice or three times.
Because the libraries are connected each other, you have to build them twice or three times until you can not see the error message. You don't need to build the whole solution.
(If you want to build the whole solution, you have to install the proper version of directX and Windows SDK. )




4-1. VRPN server build.
You don't need to code VRPN server if you don't want. Just build it, and then use it.
Find "vrpn_server" project in the Solution Explorer, and then build it.
Sometimes, it showed an external error message. "vrpn.lib" doesn't have gps~~~~. If that, rebuild "gpsnmealib" project , and then rebuild "vrpn.lib" again. It happens frequently.


5. Change the Configuration "Debug" to "Release", and build them again. This is only to use the release library.
Sometimes, it showed an error message "vrpn.lib" missing. If you saw this, just rebuild "vrpn" project. It will disappear.


6. The compiled library is in the folder.
For debug:
\vrpn_07_31\vrpn\pc_win32\debug
\vrpn_07_31\vrpn\pc_win32\DLL\Debug

For release:
\vrpn_07_31\vrpn\pc_win32\release
\vrpn_07_31\vrpn\pc_win32\DLL\release

VRPN Server:
\vrpn_07_31\vrpn\pc_win32\server_src\vrpn_server\Release
\vrpn_07_31\vrpn\pc_win32\server_src\vrpn_server\Debug

The compiled results are ;
vrpn.lib
vrpndll.lib
vrpn.dll

vrpn_server.exe

There is no difference in the library names between debug and release. So, when you use these files, be careful. It might show some warning or errors because of that.
If you don't want to be confused, one good way is changing the build files. But you have to change all the library references. Don't forget it, otherwise you can see many error messages.

7. Copy to your solution to use it.
I prefer to copy them in the VRPN root folder.
Create the folder in the VRPN folder, and then copy the files. You have to create two folders for both debug and release.




VRPN install is done.





No comments: