Home Forums Software Development [Solved] Project building with several errors when using EyeXFramework Reply To: [Solved] Project building with several errors when using EyeXFramework

#1689
Anders
Participant

Hi Siddarth,
here is how I did it:
1. create a brand new console c# project with a new solution.
2. right-click the References node in the project and choose Add references. Browse to the SDK/source/EyeXFramework/bin/x86/Debug directory and select both the EyeXFramework dll and the Tobii.EyeX.Client.Net20 dll. (This of course assumes that you built the EyeX Framework before.)
3. copy the code from the Main method in SDK/source/MinimalSamples/MinimalGazeDataStream/Program class into the Program class of the new project.
4. place the cursor on the two types that cannot be resolve and press Ctrl-. to add the necessary using statements. At this point the code compiles, but you get a DllNotFoundException if you try to run it.
5. the default platform for c# is Any CPU, but we need to change that to either x86 or x64, because otherwise we won’t know which bitness of the Tobii.EyeX.Client dll to load until runtime. Since we already chose the x86 assemblies in step 2, let’s stick to x86. Open the Build/Configuration manager dialog and add a solution platform for x86. (Re)build the app for the new platform.
6. copy the Tobii.EyeX.Client dll from Sdk/lib/x86 into the output folder of your new project. Note that the output folder will now be bin/x86/Debug by default. Now the app should run and spit out a trail of gaze data!

I hope this helps.