Silverfrost Forums

Welcome to our forums

Getting started with Simdem

29 Dec 2009 1:18 #5616

I am trying to work through the examples in Simdem package. However, after several attempts I cannot produce simdem.exe (probably for some trival reason). Below is the error message I get when trying to build simdem.exe. My questions : (a) which dll's should be added as a reference (see list at bottom) and (b) what does this error means?

Cleaning...
Clean completed.
Compiling file: simdem.for
Compiling file: runsim.for
Linking...
*** Multiple definition of symbol: _RUNSIM 
H:\\FTN95\\Clearwin\\simdem00\\CheckMate\\Win32\\simdem.obj
(H:\\FTN95\\CLEARWIN\\SIMDEM00\\SIMDEM.FOR)
and,
H:\\FTN95\\Clearwin\\simdem00\\CheckMate\\Win32\\runsim.obj
(H:\\FTN95\\CLEARWIN\\SIMDEM00\\RUNSIM.FOR)

'Files'
{
    'simdem.for'
    {
    'ProjRelPath' = 'T'
    'CustomCompilerOptions' = '0'
    'CustomSwitches' = ''
    'ExcludeFromBuild' = 'F'
    'FileGUID' = ''
    }
    'runsim.for'
    {
    'ProjRelPath' = 'T'
    'CustomCompilerOptions' = '0'
    'CustomSwitches' = ''
    'ExcludeFromBuild' = 'F'
    'FileGUID' = ''
    }
}
'References'
{
    'C:\\\\Progs\\\\Simdem\\\\bin\\\\w_menus.dll'
    {
    'CopyLocal' = 'F'
    'ProjectRef' = ''
    'IsProject' = 'F'
    'IsSTDCALL' = 'F'
    'ExcludeFromBuild' = 'F'
    'ReferenceName' = ''
    'ReferencePath' = ''
    }
    'C:\\\\Progs\\\\Simdem\\\\bin\\\\w_graphics.dll'
    {
    'CopyLocal' = 'F'
    'ProjectRef' = ''
    'IsProject' = 'F'
    'IsSTDCALL' = 'F'
    'ExcludeFromBuild' = 'F'
    'ReferenceName' = ''
    'ReferencePath' = ''
    }
    'C:\\\\Progs\\\\Simdem\\\\bin\\\\w_clearwin.dll'
    {
    'CopyLocal' = 'F'
    'ProjectRef' = ''
    'IsProject' = 'F'
    'IsSTDCALL' = 'F'
    'ExcludeFromBuild' = 'F'
    'ReferenceName' = ''
    'ReferencePath' = ''
    }
}
29 Dec 2009 2:40 #5618

The primary problem is that you have subprograms that define _RUNSIM in both simdem.for and runsim.for. The underscore might be generated by FTN95/SLINK so you may have RUNSIM as the name.

29 Dec 2009 3:06 #5619

I added runsim.for to the sources in the project explorer. This caused the problem since it is already included as [color=blue:5524d48a76]include[/color:5524d48a76] 'runsim.for' in simdem.for. Furthermore, the follwing dll's must be added in oder to work properly:

  1. w_menus.dll;
  2. w_graphics.dll and
  3. w_clearwin.dll.

Another aspect to point out is that [color=darkblue:5524d48a76]winapp[/color:5524d48a76] is not included in the example code. This causes a dos box to appear in the background. Moreover, the executable seems to be dependant on the salflib.dll. When I use the shipped dll's with the simdem package, I have to use the shipped salflib.dll as well (not my current version on my PC). Is this correct?

29 Dec 2009 7:19 #5620

This all sounds right to me. You should always be able to use the most recent version of salflibc.dll. It your 'current' version is older than the 'shipped' version then you may need to use the 'shipped' version.

30 Dec 2009 11:56 #5624

Hi Paul,

ok, everthing seems to work now. Reading through the forum I was reminded of simpleplot (so I downloaded the manuals). After working through a few examples I think that for my current problem (draw_filled_polygons in another thread) simpleplot might be easier than using simdem.

I only want to plot the polygons/mesh to see if the data is consistent, i.e. quick and dirty. Since I have no experience with this, my progress is rather slow and the only place to get information is the forum. What do you suggest: simpleplot or simdem? My simpleplot solution for a drawing the polygons is shown below. I only (seems easy, but I do not know how) need to fit it to the axis. Am I on the right track?

      winapp
      PROGRAM VIS01
      REAL Z(50,50) 
      real x_ply(50),y_ply(50),xarr(50),yarr(50)
      INTEGER I,J,IU
C
      CALL VSVRTP(0.0,0.0,90.0) 
      CALL VSNEW ! ViSualization NEW picture
      Z = 0.0
C
      iu = 99
      open(unit=iu,FILE='aa.pol')
      rewind iu
      read (iu,*) nseg_pol
      do i=1,nseg_pol
        read (iu,*) nspnts_pol,nstype_pol
        do j=1,nspnts_pol
          read (iu,*) x_ply(j),y_ply(j)
          xarr(j)=x_ply(j)*4.0
          yarr(j)=y_ply(j)*4.0
        end do
        CALL VSPGFL(xarr, yarr, Z, nspnts_pol)        
      end do
      CALL VSOUT 
      close(unit=iu) 
      CALL ENDPLT    
      END
Please login to reply.