You are on page 1of 2

How to compile AVL using MINGW in WIndows without the X11 Library This guideline assumes you have

MinGW and msys installed in your system. After i nstalling MinGW and msys, remember to append the following to the end of the pat h system environment variable in windows:C:\MinGW\bin;C:\MinGW\msys\1.0\local\bi n;C:\MinGW\msys\1.0\bin Compiling AVL requires the lX11 libray in order to make plots. The X11 is a wind owing support library used by Linux to make plots. However this library is not a vailable in Windows. Hence compiling the AVL source code on windows with lX11 li brary would require complicated process of installing several programs which is not advisable especially as it is intended to be used in an optimiser. Hence the AVL used in this program is compiled using the following steps: 1. L/ 2 Download the AVL source code from http://web.mit.edu/drela/public/web/AV Unzip the source code using your favourite unzipping program.

3. Place the AVL folder into MinGW/msys/1.0/home/usr where usr is your log in name (like c082462) 4. Now open the plot lib folder in the AVL directory MinGW/msys/1.0/home/u sr/AVL/plotlib 5. Edit the makefile.f as follows: -comment out PLTLIB=libPlt.a and uncomment PLTLIB=LibPltDp.a -comment out Xwin.o in OBJ -Change FC=f77 to FC=gfortran -Change CC=CC to CC=gcc -uncomment and change DP=r8 to DP=-fdefault-real-8 -fdefault-double-8 -comment out include.config.make -comment out Xwin.o:Xwin.c $cc -c& $ $(cflags) Xwin.c 6. Open MinGW shell or run terminal if using the 64 bit build 7. Do "cd:c:/MinGW/msys/1.0/home/usr/Avl/plotlib"

8. Do " make" 9. Open the eispack folder in the AVL directory by going to MinGW/msys/1.0/home/ usr/AVL/eispack 10. Edit the makefile as follows: -comment out FC=f77 -change fc=ifort to FC =gfortran -change Fflags =-0 to Fflags =-o -fdefault-real-8 -fdefault-double-8 Open MinGW shell or run terminal if using the 64 bit build

11.

12. Do "cd:c:/MinGW/msys/1.0/home/usr/Avl/eispack" 13. Do "make" 14 Open the bin folder in Avl directory i.e c:/MinGW/msys/1.0/home/usr/Avl/bin 15. Edit the makefile as follows: -comment out the plotOBj -change FC=f77 to FC=gfortran -change Fflags =-0 to Fflags =-o -fdefault-real-8 -fdefault-double-8 -change PLTLIB=LX11 to PLTLIB= -change SECOND=second_g77.f to SECOND =second.f

-comment out everything from "uncomment flags for desired machines" unti l and including "PLTLIB", "SECOND","FTNlib" 15. Ensure PltOBJ=...../plotlib/libpltDP.a 16 comment out $cp(SRC) /$(SECOND) $ (SRC) /second.f 17. open gw_subs.f file in src folder inside the Avl bin directory. 18. Delete contents of all subroutines except "return" and "end" commands 19. Open MinGW shell or run terminal 20. Do "cd:c:/MinGW/msys/1.0/home/usr/Avl/bin" 21. Do "make"

You might also like