Hi ,
I have just installed GPC-19990118 on a redhat 6.0 linux.
I have some questions: a.. Is it possible to make the program development on the linux, and =when I am finished to cross-compile it to windows 98/windowsNT? b.. How do I work with graphics in GNU pascal, so that I am able to =use the same source to compile to both linux/windows execute files. c.. Where do I find information on the graphics tools to use in GPC. d.. I am working with the traveling salesmans problem. There I need to =make a 2-dimensional array which contain the distance between each =city/node. As I'am new to GNU pascal and pointers, I wounder if it is =possible to make some kind of pointer structure that is working faster, =use memory dynamically or smarter than using a 2-dimensionally array? kind regards,
klaus ---------------------------- Klaus F. Østergaard
Laser Technical Services A/S Private: Sneppevang 3 Farremosen 3 DK-3450 Allerød DK-3450 Allerød tel: +45 48 17 61 61 +45 48 17 30 44 fax: + 45 48 17 10 65 Email : kfo@lasertech.dk company : laser@lasertech.dk
Klaus Friis Ãstergaard wrote:
a.. Is it possible to make the program development on the linux, and when I am finished to cross-compile it to windows 98/windowsNT?
Yes.
b.. How do I work with graphics in GNU pascal, so that I am able to use the same source to compile to both linux/windows execute files.
You can try the GRX library:
It works with DOS/VGA (including VESA), Linux/SVGAlib, Linux/X11, other Unices/X11, and I have a development version that works with mingw32/WinAPI. All of this can be cross-compiled from Linux.
c.. Where do I find information on the graphics tools to use in GPC.
Only in the source, sorry.
d.. I am working with the traveling salesmans problem. There I need to make a 2-dimensional array which contain the distance between each city/node. As I'am new to GNU pascal and pointers, I wounder if it is possible to make some kind of pointer structure that is working faster, use memory dynamically or smarter than using a 2-dimensionally array?
Not knowing too much about the traveling salesman problem I think that the 2-dimensional array is the fastest solution.
If you want to keep the dimensions of the array adjustable at run-time, you can use Extended Pascal's schema types with GPC:
Type MyArray ( m, n ) = array [ 1..m, 1..n ] of Integer;
Var A: MyArray ( 42, 137 ); B: ^MyArray;
[...] New ( B, 42, 137 ); [...] A [ 10, 17 ]:= B^ [ 22, 107 ]; [...] Dispose ( B ); New ( B, 1000, 2000 ); [...]
Another hint: Not everybody has a screen of 353 characters width. Your email would be easier to read if you used at most 80 characters per line. (IMHO, 64 are even finer.:-)
Hope this helps,
Peter
b.. How do I work with graphics in GNU pascal, so that I am able to use the same source to compile to both linux/windows execute files.
You can try the GRX library:
http://www.grx.gnu.de
This server does not exist!!
What is the correct url?
Dr. Thomas D. Schneider National Cancer Institute Laboratory of Experimental and Computational Biology Frederick, Maryland 21702-1201 toms@ncifcrf.gov permanent email: toms@alum.mit.edu http://www.lecb.ncifcrf.gov/~toms/
On Mon, Dec 20, 1999 at 02:46:59PM -0500, Tom Schneider wrote: | | > > b.. How do I work with graphics in GNU pascal, so that I am able to use the same source to compile to both linux/windows execute files. | > | > You can try the GRX library: | > | > http://www.grx.gnu.de | | This server does not exist!!
Name: tim.gerwinski.de Address: 194.221.119.17 Aliases: grx.gnu.de
probably you could guess it :-)
Tom Schneider wrote:
http://www.grx.gnu.de
This server does not exist!!
What is the correct url?
(Sorry - currently I have only slow and very expensive connection to the Internet, so I did not check.)
Peter
Peter Gerwinski a écrit :
You can try the GRX library:
http://grx.gnu.de
It works with DOS/VGA (including VESA), Linux/SVGAlib, Linux/X11, other Unices/X11, and I have a development version that works with mingw32/WinAPI.
^^^^^^^^^^^^^^ I am very interested by this port. Is it possible to have it ?
Maurice