[BACK]Return to README.MSVC CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari-2.2 / Odos

Annotation of OpenXM_contrib/pari-2.2/Odos/README.MSVC, Revision 1.2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>