From: Arjen M. <arj...@us...> - 2004-12-03 08:45:34
|
Update of /cvsroot/plplot/plplot/sys/win32/msdev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17425 Modified Files: INSTALL.TXT Log Message: Added caution regarding a Windows C/C++ compiler (optimisation problem) Index: INSTALL.TXT =================================================================== RCS file: /cvsroot/plplot/plplot/sys/win32/msdev/INSTALL.TXT,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- INSTALL.TXT 2 Dec 2004 14:11:13 -0000 1.3 +++ INSTALL.TXT 3 Dec 2004 08:45:25 -0000 1.4 @@ -1,172 +1,178 @@ -Installation instructions for the win32/msdev port of plplot -============================================================ - -1. Introduction - -This file contains information on how to compile and run the -plplot library using MS Visual C++ on PCs running MS Windows -98/NT/2000 (the current distribution has not been tested on -neither 95 nor XP however it should normally work on these -two versions of Windows as well.) - -Please note that the work on the win32/msdev port is under -progress. These instructions will tell you how to build -the plplot.lib library and all the C examples except x14c -and x17c. However, the work on the plplot.dll is not yet -finished. For more information about the win32/msdev port -of plplot please see plplot/sys/win32/msdev/README.TXT. - - -2. Requirements - -You'll need MS Visual C++ version 5, 6 or higher for building -plplot. You might be able to use an earlier version of Visual C++ -but you will probably not be able to use the provided makfiles. -You will also need to make sure that you can execute the "nmake" -command on a MS-DOS promt command line. - - -3. Source files - -You can extract the sources of plplot in any directory you want. - - -4. Compilation - - 4.1 Open a MS-DOS prompt window. - 4.2 Change directory to plplot\sys\win32\msdev - 4.3 Type "nmake". The files needed for the compilation of - plplot will be copied to plplot\tmp. - 4.4 Change directory to plplot\sys\win32\msdev\plplib. - 4.5 Type "nmake plplib.mak". The plplot.lib library will - be built and placed in the same directory. - 4.6 Change directory to plplot\sys\win32\msdev\Examples. - 4.7 Type "nmake Examples.mak". All C examples will be - built except x14c and x17c in the plplot/tmp - directory. (For comments about the examples see - plplot\sys\win32\msdev\README.TXT.) - - -5. Running plplot - -You can run the C examples directly from plplot\tmp. However, -if you would like to run your programs in a different directory -you have to make sure that plplot can find the font files -(located in plplot/lib with the extension .fnt): - - 5.1 Set the environment variable PLPLOT_HOME to point to - where you have installed plplot, e.g. - SET PLPLOT_HOME="C:\PLPLOT" - (see plplot\FAQ number 1.12) - 5.2 or simply make sure that the font files are in the same - directory where you execute your plplot program. - - -6. Building and using the DLL - -You must compile with the flag __PLDLL_H__ defined. -This is necessary to select the correct prototypes. -It is unfortunate, but there is - currently - no transparant -way to achieve this. - -Some more remarks (running the examples): -- If an example program can not find the PLplot DLL at run-time, - it may display a message box saying so, or it may simply stop without - any output. The latter happens if you start it in a DOS-box (at least - that is the case on my computer, running Windows XP). -- If the example program can not find the font files, it will stop - after you have selected a device. It will probably display a message - to that effect, but unless you run it in a DOS-box, the message will - disappear very quickly. - - -7. Building and using PLplot for Java on Windows - -(Information kindly supplied by Ali Mohammed) - -I used the following steps to compile a jni enabled dll on windows - -Pre-requisite: -1. Microsoft Visual C compiler version 12.00. It is part of Visual Studio 6. -2. nmake.exe utility. It is downloadable from microsoft.com - -Steps: - - 7.1. download the latest tarball from the following link - http://plplot.sourceforge.net/cvs-tarball/ - - 7.2. Use winzip to expand the compressed tar file to the C drive. - On my machine I have it installed under c:\plplot - - 7.3. open "c:\plplot\src\plcore.c" file in a text editor. - search for "getcwd()" and change it to "_getcwd()". - save the file. - - 7.4. Open up a dos shell in windows. Go to the following folder - c:\plplot\sys\win32\msdev - type "nmake" and press enter. (Assuming nmake is defined in the - system path) - - 7.5. Within dos shell go to the following folder - c:\plplot\sys\win32\msdev\plplib - type "nmake plplib.mak" and press enter - - 7.6. make a folder "core" under c:\plplot - create a text file in this folder with the name "run.bat" - Type in following in this file. - - set JAVA_HOME=C:\j2sdk1.4.2_01 - cl /I%JAVA_HOME%\include /I%JAVA_HOME%\include\win32 /Id:\plplot\include /LD c:/plplot/bindings/java/plplotjavac_wrap.c /Fejplplot.dll /link c:\plplot\sys\win32\msdev\plplib\plplot.lib /NOD USER32.lib GDI32.lib KERNEL32.LIB MSVCRT.LIB - - make appropriate changes based on your system environment - Run this batch file from command prompt. - -On successful completion of all the above steps you will have jplplot.dll in -"c:\plplot\core" folder. - -Any java application using plplot APIs should load this dll first. -e.g., -static { - System.load("jplplot.dll"); -} - -If you have any questions or difficulty, please feel free to email me. - -Regards, - -Ali Muhammad -email: so...@sy... - - -8. Building and using it under MicroSoft's .NET - -PLplot, version 5.3.1, can be built and used in MicroSoft's .NET -environment, if you use the C++ or C bindings. Previous versions -used an obsolete keyword which the C compiler under .NET complained -about. - - -9. Some build details - -Because the build environment on Windows is completely different than -the one on Linux and UNIX, it is not possible to configure the build -process as smoothly as under Linux/UNIX. In particular, the options -in the header file "plconfig.h" are fixed in the file "makefile" in -"sys\win32\msdev". - - -10. Comments & suggestions - -If you have comments or suggestions on how to improve the -win32/msdev port of plplot please dont't hesitate to contact -me via email. - - -Arjen Markus -WL | Delft Hydraulics -email: arj...@wl... -PLplot mailing lists: plp...@li... (general usage) - plp...@li... (questions regarding - features and other - developments) - +Installation instructions for the win32/msdev port of plplot +============================================================ + +1. Introduction + +This file contains information on how to compile and run the +plplot library using MS Visual C++ on PCs running MS Windows +98/NT/2000 (the current distribution has not been tested on +neither 95 nor XP however it should normally work on these +two versions of Windows as well.) + +Please note that the work on the win32/msdev port is under +progress. These instructions will tell you how to build +the plplot.lib library and all the C examples except x14c +and x17c. However, the work on the plplot.dll is not yet +finished. For more information about the win32/msdev port +of plplot please see plplot/sys/win32/msdev/README.TXT. + + +2. Requirements + +You'll need MS Visual C++ version 5, 6 or higher for building +plplot. You might be able to use an earlier version of Visual C++ +but you will probably not be able to use the provided makfiles. +You will also need to make sure that you can execute the "nmake" +command on a MS-DOS promt command line. + + +3. Source files + +You can extract the sources of plplot in any directory you want. + + +4. Compilation + + 4.1 Open a MS-DOS prompt window. + 4.2 Change directory to plplot\sys\win32\msdev + 4.3 Type "nmake". The files needed for the compilation of + plplot will be copied to plplot\tmp. + 4.4 Change directory to plplot\sys\win32\msdev\plplib. + 4.5 Type "nmake plplib.mak". The plplot.lib library will + be built and placed in the same directory. + 4.6 Change directory to plplot\sys\win32\msdev\Examples. + 4.7 Type "nmake Examples.mak". All C examples will be + built except x14c and x17c in the plplot/tmp + directory. (For comments about the examples see + plplot\sys\win32\msdev\README.TXT.) + + +5. Running plplot + +You can run the C examples directly from plplot\tmp. However, +if you would like to run your programs in a different directory +you have to make sure that plplot can find the font files +(located in plplot/lib with the extension .fnt): + + 5.1 Set the environment variable PLPLOT_HOME to point to + where you have installed plplot, e.g. + SET PLPLOT_HOME="C:\PLPLOT" + (see plplot\FAQ number 1.12) + 5.2 or simply make sure that the font files are in the same + directory where you execute your plplot program. + + +6. Building and using the DLL + +You must compile with the flag __PLDLL_H__ defined. +This is necessary to select the correct prototypes. +It is unfortunate, but there is - currently - no transparant +way to achieve this. + +Some more remarks (running the examples): +- If an example program can not find the PLplot DLL at run-time, + it may display a message box saying so, or it may simply stop without + any output. The latter happens if you start it in a DOS-box (at least + that is the case on my computer, running Windows XP). +- If the example program can not find the font files, it will stop + after you have selected a device. It will probably display a message + to that effect, but unless you run it in a DOS-box, the message will + disappear very quickly. + + +7. Building and using PLplot for Java on Windows + +(Information kindly supplied by Ali Mohammed) + +I used the following steps to compile a jni enabled dll on windows + +Pre-requisite: +1. Microsoft Visual C compiler version 12.00. It is part of Visual Studio 6. +2. nmake.exe utility. It is downloadable from microsoft.com + +Steps: + + 7.1. download the latest tarball from the following link + http://plplot.sourceforge.net/cvs-tarball/ + + 7.2. Use winzip to expand the compressed tar file to the C drive. + On my machine I have it installed under c:\plplot + + 7.3. open "c:\plplot\src\plcore.c" file in a text editor. + search for "getcwd()" and change it to "_getcwd()". + save the file. + + 7.4. Open up a dos shell in windows. Go to the following folder + c:\plplot\sys\win32\msdev + type "nmake" and press enter. (Assuming nmake is defined in the + system path) + + 7.5. Within dos shell go to the following folder + c:\plplot\sys\win32\msdev\plplib + type "nmake plplib.mak" and press enter + + 7.6. make a folder "core" under c:\plplot + create a text file in this folder with the name "run.bat" + Type in following in this file. + + set JAVA_HOME=C:\j2sdk1.4.2_01 + cl /I%JAVA_HOME%\include /I%JAVA_HOME%\include\win32 /Id:\plplot\include /LD c:/plplot/bindings/java/plplotjavac_wrap.c /Fejplplot.dll /link c:\plplot\sys\win32\msdev\plplib\plplot.lib /NOD USER32.lib GDI32.lib KERNEL32.LIB MSVCRT.LIB + + make appropriate changes based on your system environment + Run this batch file from command prompt. + +On successful completion of all the above steps you will have jplplot.dll in +"c:\plplot\core" folder. + +Any java application using plplot APIs should load this dll first. +e.g., +static { + System.load("jplplot.dll"); +} + +If you have any questions or difficulty, please feel free to email me. + +Regards, + +Ali Muhammad +email: so...@sy... + + +8. Building and using it under MicroSoft's .NET + +PLplot, version 5.3.1, can be built and used in MicroSoft's .NET +environment, if you use the C++ or C bindings. Previous versions +used an obsolete keyword which the C compiler under .NET complained +about. + +Note: +It appears that the C/C++ compiler in .NET2003 has an optimisation +bug/quirk which can make contour and shade drawings look bad. This means +that you have to turn off the optimisation for this compiler (by default +it is turned on in the PLplot makefile!) + + +9. Some build details + +Because the build environment on Windows is completely different than +the one on Linux and UNIX, it is not possible to configure the build +process as smoothly as under Linux/UNIX. In particular, the options +in the header file "plconfig.h" are fixed in the file "makefile" in +"sys\win32\msdev". + + +10. Comments & suggestions + +If you have comments or suggestions on how to improve the +win32/msdev port of plplot please dont't hesitate to contact +me via email. + + +Arjen Markus +WL | Delft Hydraulics +email: arj...@wl... +PLplot mailing lists: plp...@li... (general usage) + plp...@li... (questions regarding + features and other + developments) + |