# Gardner Lab

## Stanford University

### Site Tools

You may install directly from the SR Research website (you will need a login), see instructions below or if you are a GRU member you can download the files directly following the instructions below (note that the libraries are SR Research proprietary so we cannot distribute them to non-lab members).

1. Make sure that you have already installed the EyeLink_Developers_Kit_For_MacOSX (you should have eyelink frameworks in /Library/Frameworks).
2. Double-click on the .tar files to open them (or from a terminal use tar xfv *.tar).
4. Compile using mglMake('eyelink') in matlab. If you run into errors see below.

As of Jun 25, 2013 the installation procedure is as follows:

1. Create an account at SR research support page.

1. Remove the following frameworks from /Library/Frameworks, as they will be replaced by the next steps: edfapi, eyelink_core, eyelink_core_graphics, SDL, SDL_mixer, SDL_image, SDL_ttf, SDL_gfx if you have them.
2. Start installation with “Eyelink_Developers_Kit_For_MacOSX.dmg”. The goal is to install frameworks into /Library/Frameworks.
3. Make sure that the frameworks in the SDL directory and Frameworks get copied to /Library/Frameworks
4. unzip “edfapi_mac_osxuniversal.zip”. Copy “edfapi.frameworks” to /Library/Frameworks.
5. run mglMake('eyelink') and check below if you run into any errors.
1. If mglMake('eyelink') says that everything is “up to date” then you should go and delete all the *.mexmaci64 files in mgl/mgllib/mglEyelink
2. You may also need the SDL frameworks (although these can be the old ones which should have been installed when you first installed eyelink: SDL.framework, SDL_ttf.framework, SDL_mixer.framework, SDL_image.framework, SDL_gfx.framework). Check in /Library/Frameworks for these frameworks. If they are not there, you should install them from the install disk.
3. If you see errors like the following
ld: framework not found edfapi
collect2: ld returned 1 exit status

Error using mex (line 206)
Unable to complete successfully.

-- or --

mglEyelinkIsConnected.c:26: error: 'INT16' undeclared (first use in this function)
mglEyelinkIsConnected.c:26: error: (Each undeclared identifier is reported only once
mglEyelinkIsConnected.c:26: error: for each function it appears in.)
mglEyelinkIsConnected.c:26: error: expected ';' before 'connectionStatus'
mglEyelinkIsConnected.c:29: error: 'connectionStatus' undeclared (first use in this function)

It probably means the compiler/linker cannot find the Framework properly. Make sure of the following:

1. /Library/Frameworks has both edfapi.framework and eyelink_core.framwork (just ls the directory and check)
2. Make sure that those two frameworks are properly installed. You should be able to ls the directory and get something like this
terranova:/Library/Frameworks> ls /Library/Frameworks/edfapi.framework/
Headers@      Resources@    Versions/     eyelink_core@
terranova:/Users/justin> cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks
terranova:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks> sudo ln -s /Library/Frameworks/edfapi.framework .