From: <arj...@us...> - 2010-12-30 08:35:34
|
Revision: 11404 http://plplot.svn.sourceforge.net/plplot/?rev=11404&view=rev Author: arjenmarkus Date: 2010-12-30 08:35:28 +0000 (Thu, 30 Dec 2010) Log Message: ----------- Introduce workaround for a problem with gfortran on Windows: COMMON blocks are not exported from the DLL, despite a compiler directive. Modified Paths: -------------- trunk/bindings/f77/sfstubs.fm4 trunk/examples/f77/x09f.fm4 Modified: trunk/bindings/f77/sfstubs.fm4 =================================================================== --- trunk/bindings/f77/sfstubs.fm4 2010-12-30 08:33:24 UTC (rev 11403) +++ trunk/bindings/f77/sfstubs.fm4 2010-12-30 08:35:28 UTC (rev 11404) @@ -36,6 +36,23 @@ c c*********************************************************************** + subroutine plsettransform(trcoef) + + implicit none + real*8 trcoef(*) + + integer i +cDEC$ ATTRIBUTES DLLEXPORT :: PLPLOT + real*8 tr(6) + common /plplot/ tr + + do 100 i = 1,6 + tr(i) = trcoef(i) + 100 continue + + end + +c*********************************************************************** subroutine plsetopt(opt, optarg) implicit none Modified: trunk/examples/f77/x09f.fm4 =================================================================== --- trunk/examples/f77/x09f.fm4 2010-12-30 08:33:24 UTC (rev 11403) +++ trunk/examples/f77/x09f.fm4 2010-12-30 08:35:28 UTC (rev 11404) @@ -51,6 +51,14 @@ tr(5) = 2.d0/dble(nptsy-1) tr(6) = -1.0d0 +c +c At least one compiler (gfortran) on Windows does not +c unite the COMMON blocks in the main program and the +c shared library (DLL). The call to plsettransform +c is a workaround for this + + call plsettransform(tr) + c Calculate the data matrices. do i=1,nptsx xx = dble(i-1-(nptsx/2))/dble (nptsx/2) @@ -105,6 +113,7 @@ c Plot using 1d coordinate transform call plenv(-1.0d0, 1.0d0, -1.0d0, 1.0d0, 0, 0) call plcol0(2) + call plcon1(z,xdim,ydim,1,nptsx,1,nptsy,clevel,11, xg1, yg1) call plstyl(1,1500,1500) call plcol0(3) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |