[gl2ps] GL2PS link to Fortran development environment

Christophe Geuzaine geuzaine at acm.caltech.edu
Wed May 5 00:14:43 CEST 2004


Tammy Henry wrote:
> I have downloaded gl2ps and compiled an object code 
> successfully, but encountered linker errors complaining of 
> unresolved externals for each Fortran call to the gl2ps C 
> subroutines.  Though well versed in Fortran/UNIX, I need help in 
> getting hardcopy capability from our new Fortran/opengl programs 
> on HP Itanium 2 with MS XP64 OS.  I thought it would be sufficient 
> to simply link the gl2ps object code, but apparently a Fortran 
> binding or wrapper may be needed.


This depends on your particular compiler, but you will probably have to
define a couple of wrappers for all the GL2PS routines that you want to
call from your Fortran code (adding trailing underscores and passing all
the arguments by reference, etc.).

Note that this is completely independent of GL2PS. If you can make it
work with a simple C example, it will also work with GL2PS.

Best,

Christophe

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org