Annotation of OpenXM_contrib/pari/Odos/README.MSVC, Revision 1.1
1.1 ! maekawa 1: Posted on pari-dev by Bill Daly : [edited to fit current filenames]
! 2: =================================
! 3:
! 4: Here is a description of the steps necessary to compile PARI with the MSVC
! 5: compiler under WIN32.
! 6:
! 7: 1. Unzip the archive, preserving folder names so that the directory
! 8: structure is correct. I use WinZip to do this, and I put the files on my D:
! 9: drive, so that the files for pari-2.0.16.beta for example will be stored
! 10: under D:\pari-2.0.16.beta. Note that the archive as downloaded, pari.tgz,
! 11: is an archive of an archive. Winzip doesn't know how to unzip pari.tgz, so
! 12: I use Aladdin Expander to do this, which will create for example the file
! 13: pari-2.0.16.beta.tar in the same directory as pari.tgz. Unfortunately,
! 14: Aladdin Expander doesn't know how to unzip this file, so I use Winzip to do
! 15: it. Isn't Windows wonderful?
! 16:
! 17: 2. MSVC doesn't like names of the form "pari-2.0.16.beta", so rename the
! 18: base directory to something like "pari216b". Now the files are stored under
! 19: D:\pari216b.
! 20:
! 21: 3. Start MSVC (I use version 6, but earlier versions will probably work the
! 22: same way).
! 23:
! 24: 4. Select "File\New..." and pick the "Project" tab to create a new project.
! 25: Select "Win32 Console Application" as the project type, and specify the
! 26: project name as "pari216b". Make sure that the "Location" of the files is
! 27: D:\pari216b. Click "OK", then select "An empty project" (should be the
! 28: default anyway) and click "Finish".
! 29:
! 30: 5. Select "Project\Add to project\Files..." to add files to the project.
! 31: Select all the *.c and *.h files in src\basemath, src\headers,
! 32: src\kernel\ix86, src\language, src\modules and Odos, EXCEPT pariCE.[ch];
! 33: all of the files in src\gp except gp_rl.c; the files plotnull.c, plotport.c
! 34: and rect.h in src\graph.c; and the file src\kernel\none\mp.c.
! 35:
! 36: 6. Select "Project\Settings" and pick the "C/C++" tab. Select
! 37: "Preprocessor" from the "Category" menu, and enter
! 38: "D:\pari216b\src\headers,D:\pari216b\win32" into the "Additional include
! 39: directories" box. (I also select the "Code Generation" category and change
! 40: the "Struct member alignment" to "1 byte", but this may not be necessary.)
! 41: It is usually convenient for debugging to select the "Debug" tab and
! 42: specify a "Working directory", e.g. "D:\gp" if you have .gp files there
! 43: that you can use for testing.
! 44:
! 45: You should now be able to build and test the program. When you want to
! 46: build a release version, you will have to repeat step 6 above, since MSVC
! 47: doesn't apply the project settings globally.
! 48:
! 49: A couple of points:
! 50: -------------------
! 51: You may get some inconsequential warning messages. You can suppress these
! 52: by adding a line of the form:
! 53:
! 54: #pragma warning(disable: ...)
! 55:
! 56: to paricfg.h, where ... is a space-delimited list of warning numbers, e.g.
! 57: "4018 4244" corresponding to the warnings C4018 and C4244.
! 58:
! 59: When you compile a release version, global optimization is enabled by
! 60: default. MSVC is fairly buggy with global optimization, so you may find
! 61: that some modules won't compile with it, e.g. sumiter.c. You can either
! 62: disable global optimization (in "Project\Settings" under the tab "C/C++" in
! 63: the category "Optimization"), or you can surround the offending code with:
! 64:
! 65: #pragma optimization("g", off)
! 66: ...
! 67: #pragma optimization("g", on)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>