|
- |
PhysioNet · PhysioBank · PhysioToolkit |
Under Windows Vista or Windows 7, it may be necessary to perform some or all of the steps below while logged into an account with "administrator" permissions.
If you download the sources (recommended):
cd /home/wfdb(Omit c:\cygwin\ from this cd command, and use a forward slash (/) rather than a backslash (\) as a directory separator where needed.) Perform the remainder of the installation by typing the commands as shown below into this Cygwin window. Do not use an MS-DOS window for this purpose.
tar xfvz wfdb.tar.gzIf your browser decompressed the archive during the download, you will need to use this command instead:
tar xfv wfdb.tarThis creates a directory with a name of the form wfdb-10.m.n within your working directory. Look at the list of files printed by the tar command to determine the name of the directory for the next step.
cd wfdb-10.m.n ./configure(In the cd command, replace wfdb-10.m.n with the name of the directory as printed by tar in the previous step.)
makeSkip this step on an initial installation. The checks performed by 'make check' (described below) are run on the test binaries if you do perform this step.
make install
make checkThis step compiles a short program that exercises the WFDB library, prints a summary of test results, and prompts you to press <Enter>. After you have done so, the WFDB applications are tested. The tests are very short (typically less than a second each), except that the last one (xform using NETFILES) may take up to a minute if you have a slow or inoperative Internet connection. If any application test fails, its output can be found in the checkpkg subdirectory of the WFDB source tree; compare this output with the files of the same names that can be found in the checkpkg/expected subdirectory.
ln -sf /usr/bin/libwfdb.dll.a /usr/lib
wave -r mitdb/200 -a atr
Note that WAVE's menus (marked with a
) are opened using a right click. Annotation editing
requires the use of the middle button; if your mouse has only two
buttons, you may be able to simulate a middle button click by "chording"
(press both buttons at the same time, then release them; see
this note
for details if necessary).
If you have not used WAVE before, you may want to follow through the tutorial
material in the beginning of the WAVE User's
Guide.
If you wish to compile your own WFDB applications, or others that are not available in binary format, please begin by compiling and installing the WFDB software package sources, as described above. Once you have done so, copy app/Makefile (a text file contained in the WFDB source package) to the directory that contains the source for the application you wish to compile. Note that app/Makefile is customized based on the installation choices that you make when you run ./configure before compiling the WFDB software package, so it's important to copy the customized version of this file from your copy of the WFDB sources only after running ./configure.
If the application is contained in a single source file (for example, myprogram.c) in the same directory as this customized Makefile, you can compile it and link it with the WFDB library using a command such as
make myprogramThis method is recommended since it can be difficult to construct the proper gcc command line manually. As part of the output of make, you will see the gcc command line it constructs, and you can follow this model for subsequent compilations if you prefer not to use make.
If you need to compile an application contained in several source files, use the command generated by make for a single source file compilation and replace the single source name with those of your multiple source files, separated by spaces. Note that the output file name (the argument of gcc's -o option) should not include the .exe suffix.
The WFDB Software Package also includes wfdb-config, a tiny
application that helps to construct gcc command lines without using
make. Study the example in
wfdb-config(1) to see how to use
it.
Making a native Windows version of the WFDB library
The procedure above generates a WFDB library that depends upon Cygwin's POSIX emulation library (cygwin1.dll) to provide a Unix-like operating environment, thus assuring that WFDB applications will behave on MS-Windows as much as possible like they do on other platforms. It is also possible, though not generally recommended, to make a WFDB library that depends only on the native libraries provided with MS-Windows.
There are two specific cases in which you might need a native Windows version of the WFDB library:
The method outlined below will allow you to create a Windows native version of the WFDB library that does not depend on Cygwin's POSIX emulation library or any third party libraries other than those provided with MS-Windows. This method also creates a mostly complete set of WFDB applications (except for WAVE) that are used to test the WFDB library; use them at your own risk, since they may not behave in exactly the same way as the standard versions of the same applications.
Please note that this method, and any others that do not use an ANSI/ISO C compiler such as gcc, are unsupported. Your feedback is welcome, but we do not use any commercial compilers and cannot help you learn how to use them.
mkdir -p /opt/wfdb/bin export PATH="/opt/wfdb/bin:$PATH"The mkdir command also creates /opt and /opt/wfdb if they do not exist already.
cd /opt unzip ~/libcurl-*nossl.zipThe libcurl files will unpack into a version-numbered directory under /opt, such as /opt/libcurl-7.17.1. Copy the needed files into /opt/wfdb:
cd /opt/libcurl-7.17.1 cp -p bin/curl-config lib/* /opt/wfdb/bin cp -pr include /opt/wfdb
prefix=/usr/localwith
prefix=/opt/wfdbAlso, search for any lines containing '-L/home/dast/src/win32'. Delete this string, and anything that follows it on the same line, wherever it appears. For example, a line that looks like:
echo ${CURLLIBDIR}-lcurl -L/home/dast/src/win32 ...
should be changed to:
echo ${CURLLIBDIR}-lcurl
(deleting the remainder of the line following '-lcurl').
If you installed libcurl in step 3 above, type:
make clean ./configure --without-cygwin --prefix=/opt/wfdb make installreplacing /opt/wfdb with the name of the target directory you chose in step 2 above, if different.
If you did not install libcurl in step 3 above, type these commands instead:
make clean ./configure --without-cygwin --without-netfiles --prefix=/opt/wfdb make install
make checkmany checks will fail because text files written by the native Windows WFDB applications will be in DOS format (with CR+LF line terminators). This is normal and is not an indication of problems.
For additional information about this procedure, see
README.WINDOWS.
Using a compiler other than gcc
This is strongly discouraged. gcc is free, is of very high quality, and is supported; if you use another compiler, you are on your own. Note that if you compile the WFDB library and applications with gcc, you may link code compiled with another compiler to the WFDB DLL generated by gcc (the DLL is in the same format as that produced by other compilers that generate MS-Windows DLLs).
It is not possible to compile or use WAVE under MS-Windows except by using Cygwin gcc and the Cygwin X libraries.
If you do not use gcc, you must do one of the following:
If you do neither of these steps, your compiler will generate a defective WFDB DLL that assumes that files are always opened in so-called text mode, resulting in errors when reading and writing signal and annotation files (which are binary files). You can check to see if this has happened by running the command
rdsamp -r 100s
which should yield 21600 numbered lines of output, ending with
21596 982 995
21597 978 989
21598 975 988
21599 975 989
If the output ends after 940 lines, you have a defective WFDB DLL and
you will need to follow the instructions above to correct the problem.
| Send feedback about this page to PhysioNet |
|
Your comments and suggestions are welcome. We encourage you to use our feedback form to comment on this page. If you would like to receive a reply, please send your comments by email to webmaster@physionet.org, or post them to: MIT Room E25-505A 77 Massachusetts Avenue Cambridge, MA 02139 USA |
![]() |
Updated Tuesday, 13-Oct-2009 14:53:08 EDT