Back to the main page.

Bug 1838 - Wrong path in the -I and -L flags in the buffer compile.m

Reported 2012-11-19 13:09:00 +0100
Modified 2012-11-19 15:26:25 +0100
Product: FieldTrip
Component: realtime
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to: Robert Oostenveld
Depends on:
See also:

George Dimitriadis - 2012-11-19 13:09:27 +0100

if strcmp(computer,'PCWIN64') extra_cflags = '-I../pthreads-win64/include'; amd64 = true; else extra_cflags = '-I../pthreads-win32/include'; amd64 = false; end . . . case 'BCB' ldflags = '-L../pthreads-win32/lib -lpthreadVC2.bcb'; case 'BCC55' ldflags = '-L../pthreads-win32/lib -lpthreadVC2_bcc55'; case 'MINGW' % For MinGW/Gnumex, it seems to be easier to just directly refer to the archives, since % the MEX tools expect libraries to end with .lib, whereas MinGW uses the .a suffix. if amd64 ldflags = '../pthreads-win64/lib/libpthread.a'; ws2lib = 'C:/mingw64/x86_64-w64-mingw32/lib/libws2_32.a'; else ldflags = '../pthreads-win32/lib/libpthreadGC2.a'; ws2lib = 'C:/mingw/lib/libws2_32.a'; end . . . case 'VC' if amd64 ldflags = '-L../pthreads-win64/lib -lpthreadVC2 ws2_32.lib'; else ldflags = '-L../pthreads-win32/lib -lpthreadVC2 ws2_32.lib '; end With the new directory structure the libs for the pthreads should be found in '../../external/pthreads-win...' otherwise the buffer mex won't compile. Also for the buffer mex to work in win x64 the pthreadGC2-w64.dll must also exist in the same dir as the buffer mex. I pressume for windows x86 the equivalent dll should also recide in the same dir (but haven't checked this).

Robert Oostenveld - 2012-11-19 15:25:24 +0100

thanks for reporting. I have updated the paths, could you please check? mac001> svn commit Sending matlab/compile.m Transmitting file data . Committed revision 6951.

Robert Oostenveld - 2012-11-19 15:26:25 +0100

regarding the location of the dll files: at this moment it is like this mac001> pwd /Volumes/Data/roboos/matlab/fieldtrip/fileio/private mac001> ll *.dll -rwxr-xr-x 1 roboos staff 42496 Jan 9 2012 pthreadGC2-w64.dll -rwxr-xr-x 1 roboos staff 65627 Jan 9 2012 pthreadGC2.dll -rwxr-xr-x 1 roboos staff 86070 Jan 9 2012 pthreadVC2.dll which means that the dlls are in the same dir as where the mex file is expected to be (after copying it over the older release version).